{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "SPAM_PATH = os.path.join('datasets', 'spam') # 拼接路径"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'datasets\\\\spam'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "SPAM_PATH"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "HAM_DIR = os.path.join(SPAM_PATH, 'easy_ham') # 正常邮件路径\n",
    "SPAM_DIR = os.path.join(SPAM_PATH, 'spam') # 垃圾邮件路径\n",
    "ham_filenames = [name for name in sorted(os.listdir(HAM_DIR)) if len(name) > 20]\n",
    "spam_filenames = [name for name in sorted(os.listdir(SPAM_DIR)) if len(name) > 20]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['00001.7c53336b37003a9286aba55d2945844c',\n",
       " '00002.9c4069e25e1ef370c078db7ee85ff9ac',\n",
       " '00003.860e3c3cee1b42ead714c5c874fe25f7',\n",
       " '00004.864220c5b6930b209cc287c361c99af1',\n",
       " '00005.bf27cdeaf0b8c4647ecd61b1d09da613',\n",
       " '00006.253ea2f9a9cc36fa0b1129b04b806608',\n",
       " '00007.37a8af848caae585af4fe35779656d55',\n",
       " '00008.5891548d921601906337dcf1ed8543cb',\n",
       " '00009.371eca25b0169ce5cb4f71d3e07b9e2d',\n",
       " '00010.145d22c053c1a0c410242e46c01635b3',\n",
       " '00011.fbcde1b4833bdbaaf0ced723edd6e355',\n",
       " '00012.48a387bc38d1316a6f6b49e8c2e43a03',\n",
       " '00013.81c34741dbed59c6dde50777e27e7ea3',\n",
       " '00014.cb20e10b2bfcb8210a1c310798532a57',\n",
       " '00015.4d7026347ba7478c9db04c70913e68fd',\n",
       " '00016.ef397cef16f8041242e3b6560e168053',\n",
       " '00017.08ef2d89f14cf7e2a458b80697eb1837',\n",
       " '00018.6fee38026193b5adde4b56892a6f14bc',\n",
       " '00019.5322cb10d8819b39499924d852819c27',\n",
       " '00020.d10651e31fcb92630c6229ec773cfe26',\n",
       " '00021.607c41268c5b0d66e81b58713a66d12c',\n",
       " '00022.48098f942c31097d2ef605df44dd8593',\n",
       " '00023.e0e815ea1d7fd40e7e70b4c0035bef0c',\n",
       " '00024.59c2cb781c60594315241e2b50ea70e2',\n",
       " '00025.d685245bdc4444f44fa091e6620b20b3',\n",
       " '00026.f9755fb0cee92676d7bd76d32bc5f50f',\n",
       " '00027.4d456dd9ce0afde7629f94dc3034e0bb',\n",
       " '00028.ddbae7c7b229813409ae50c47624ddb9',\n",
       " '00029.56d4310a82386b76b9e771523d571e67',\n",
       " '00030.cc78e84cd398ff4a2e9e287263de928f',\n",
       " '00031.ac7e81ff64671b17569d2c6a66648bb2',\n",
       " '00032.57e29a75bca42afb412fc68d5051aa20',\n",
       " '00033.2ceb520d2c6500ccf24357f2ebdce618',\n",
       " '00034.1d56abea55f3c516d0ffdd4f1e8b883b',\n",
       " '00035.9069e05ad40dd0f98cdae72072ee7186',\n",
       " '00036.719795e8d4670c6d8095274b18b59749',\n",
       " '00037.5a7af2f7bd57a2f50b7cfa05d5e37c29',\n",
       " '00038.cd457af47eb78d4b93c7d94043a43108',\n",
       " '00039.be5e34dcebd922928045634015e3ed78',\n",
       " '00040.eec48d76fbc04e9b98c3de0f59af97ac',\n",
       " '00041.002af69a10eb9b6683a7cff5f3ac14b4',\n",
       " '00042.efe6317ef2ebefe739aaeb4f0d51fbdb',\n",
       " '00043.d2673a72d215cbdd747dc98cde41fbd2',\n",
       " '00044.d087bf5e76ba737908b482cb028b056c',\n",
       " '00045.f0a8de2cf2b3cf745341b960d7a0119f',\n",
       " '00046.c8491e68aa5652272d6511bb7d848d37',\n",
       " '00047.39812fcb014cf9c22a2ff4fec61f3c19',\n",
       " '00048.1e067f31e83cc6ea3e9103b52f15588e',\n",
       " '00049.838d44b342e0ab4743507510a8ca206f',\n",
       " '00050.74d3103c5691914a530dcae2f656a1f5',\n",
       " '00051.03dcdb0e4e6100cfcf0eddbf78fbae17',\n",
       " '00052.c6c74aeef6d36423f57807ad4c901dc4',\n",
       " '00053.707c625cb618aadafe3e54544fa3ca78',\n",
       " '00054.f3e1dc8f3a7fdc5bec424db5e07e8ef8',\n",
       " '00055.8481bc92aa3ab9d23ca30c0eaecfc5e4',\n",
       " '00056.b510d34bac037c4c377b1f51dbe5f0d3',\n",
       " '00057.7c3a836baaa732cd915546442c0fef1a',\n",
       " '00058.ecfc3a7f406355a82abe9d16d3d5733a',\n",
       " '00059.34a8067a36762120b9292004a4d68558',\n",
       " '00060.d51949a7342f8adc568483f6e799ee25',\n",
       " '00061.9cc2b5c110807914cc6c38263b7dd62a',\n",
       " '00062.009f5a1a8fa88f0b38299ad01562bb37',\n",
       " '00063.0acbc484a73f0e0b727e06c100d8df7b',\n",
       " '00064.cb4bd5482454f02b6c3d70343af090a8',\n",
       " '00065.fa593405941ce1f32a29e813493eacf2',\n",
       " '00066.7dda463deb5e41ba1af3a0da55ab504b',\n",
       " '00067.23813c5ac6ce66fd892ee5501fd5dbd2',\n",
       " '00068.5053f669dda8f920e5300ed327cdd986',\n",
       " '00069.1477f740f56d3e0bd132ad70993edda5',\n",
       " '00070.c62a036deb1de40aa32cabc761b0861c',\n",
       " '00071.a1a5f4834bebcb59bb75698821cf9f9a',\n",
       " '00072.8dcd09744b5534002262a8f3927ba3fc',\n",
       " '00073.30ffa73f8021a40ac03218af092d0dc7',\n",
       " '00074.71045f0bdb236b814e4729d318bd6509',\n",
       " '00075.6485889c364c71761110c2b1190bb645',\n",
       " '00076.5aa682e393bfbef53e244acf3b2d23d6',\n",
       " '00077.24cfaba59d55d652be33b58bd7d41ca2',\n",
       " '00078.2ea8ca29bc2ed373a6c8270b488def60',\n",
       " '00079.5fa6a133fe202da2627f52bdf31fc6e2',\n",
       " '00080.ba42e846212f912a63aa36c7a9ded217',\n",
       " '00081.c16e4d631ac7941fd25ffb1cd316e100',\n",
       " '00082.b40e4eedafc60aef72a0a0cbb63c2406',\n",
       " '00083.d6bec4788401bc0df20b740557680768',\n",
       " '00084.2ef0c65e298880c3869b39dc95b40e8e',\n",
       " '00085.badc533c7037554017afb30c94dfcb55',\n",
       " '00086.2d36c5f829135d1fed8f88471163b240',\n",
       " '00087.03a92f5753c44cb83d28837121d82b06',\n",
       " '00088.945614c3f6213f59548ab21306451675',\n",
       " '00089.c31c9b44b66c440d6b39c5f8841ed43b',\n",
       " '00090.3af9d04b3ade1077fce4fb224ebf38cb',\n",
       " '00091.abb1965e279e4365f1ef31e4878c5d14',\n",
       " '00092.7ecc7d565565fbe466bfc8db6e456f9d',\n",
       " '00093.ee758841ef674e30d7d36f22fffeaeb6',\n",
       " '00094.ef72156b3ba9ff0fc5fedc2125ceb736',\n",
       " '00095.24caf7db5c45203f312f742f49385618',\n",
       " '00096.3517ca839b03cdf37c14ff9b3667dd98',\n",
       " '00097.e8e276c07ee885c4b8d904c1414412e5',\n",
       " '00098.90c05d1ad65ea3fa796bfa2808f71052',\n",
       " '00099.beef92f5eeeed3e40c1facf42809d510',\n",
       " '00100.f070e3aaa7f475f95589b1900ff58d26',\n",
       " '00101.216942b87258b063ec2d7b7981ee2454',\n",
       " '00102.b18fa07ca9504cfc39be46ba8376ee7d',\n",
       " '00103.23abe7cbe651a970e2dc6cc531c268a3',\n",
       " '00104.1a66c829aa9b0883591a2e8266c18bb2',\n",
       " '00105.00d508c7c037170e597798385b380a80',\n",
       " '00106.d8f1a8de1b70767b3dbf5ce810da67fd',\n",
       " '00107.787086c3c593b9e2335199019b130158',\n",
       " '00108.9ab147c83812fc34f69032c40df5a21f',\n",
       " '00109.bcb73e4561798e05f2299471ab0be1bb',\n",
       " '00110.1e36beebd2dffe60b0d8f68d82bde52c',\n",
       " '00111.a478af0547f2fd548f7b412df2e71a92',\n",
       " '00112.55ec2d4a4203ff075f5570bdac744550',\n",
       " '00113.6b233fa48d08abf97ff91e4548fd381d',\n",
       " '00114.240461056916c0cdd555ba9d2bc9e63e',\n",
       " '00115.d5db4a9d477aa17a19669e3945b7aedb',\n",
       " '00116.22aef63fc606e0ad46b5593bc897469a',\n",
       " '00117.a9afb0bc89818ffe2f2a590c8a40434b',\n",
       " '00118.f15bf997342540b404a4672c47d57d55',\n",
       " '00119.0f469afee6aef0a05d9850f7021bd629',\n",
       " '00120.4de6f88fbcb22a39a0498f84d9ce358b',\n",
       " '00121.333fff2f2cb3dfd617a6210b669757d3',\n",
       " '00122.b4b9733750e203d0215d49043d29c173',\n",
       " '00123.91b85aaea560d92f9199f9ba74e77918',\n",
       " '00124.f0f8fe0588f5245c08846ca9d308dfb1',\n",
       " '00125.0b972a986a586ab4ba3ff45e88f330db',\n",
       " '00126.b0a45fbc9d8f9e6de6be5d3062cc91ef',\n",
       " '00127.c1981aeb12ebd22536f12f0a044efe56',\n",
       " '00128.0e92ec0c8bd8233f7e7873e93df43277',\n",
       " '00129.ac1318f7fba969847e1ac4aa4ec3c26a',\n",
       " '00130.77c75ddeffde2b89edaf8720370f6afc',\n",
       " '00131.0884e29887b7378ca04f4defe0a069e0',\n",
       " '00132.2eddfbbe44385a450eae4ee89da0a830',\n",
       " '00133.e5aa9fa1cc35faff5801a6b16ca7afa6',\n",
       " '00134.f7d26b0dc6c2f3de63b08d2810d54df6',\n",
       " '00135.bd3bc1c036eab89c9c50cff40958c939',\n",
       " '00136.c507301e643ec123aa6e487ce2e2e3e2',\n",
       " '00137.11311a8e5dbfe18503bf736b82b91fc7',\n",
       " '00138.b4fe49f8cd3b3bcc8d19741e705b0e01',\n",
       " '00139.cfea5d726c0371fa63c9720a291ca9ad',\n",
       " '00140.354632516317e3a37a05e93c609ec65d',\n",
       " '00141.00b956daf6951da2bea354300d121512',\n",
       " '00142.0f7dc427ea4ecdf0c257b8bf7d152249',\n",
       " '00143.4cae4623140fc349a57dac7ffd863227',\n",
       " '00144.a6f12b97adc08a63ce541daaba0b0825',\n",
       " '00145.9e4594abeb96d3ba5650b9cf88e91015',\n",
       " '00146.a6d4ba98c7866de55109077d2960d245',\n",
       " '00147.fcb1b60290a155a5b837cd290b77a6dd',\n",
       " '00148.6bdcd2791992fb3b923e961f71295ce8',\n",
       " '00149.6ace09f27948721429b08699d9b92f4c',\n",
       " '00150.a4c5a8aaccd6b54f1000e9fa02f53114',\n",
       " '00151.4ecb35a7f837a0240663d3bbc5c8dbe8',\n",
       " '00152.703c271de3d42fb8bf266db6f77a0dda',\n",
       " '00153.2ba33aef8f6b3010c92db7f992fbec43',\n",
       " '00154.cc63335f9a4e3b5f4a16be338b0d00a4',\n",
       " '00155.22281cddbc29a93d630798e0aa97f725',\n",
       " '00156.d4205c868d67d1c334455950b21d226d',\n",
       " '00157.3a532432a98ebf828fdeb46a6ddfa082',\n",
       " '00158.71abc842fe120eb73cbfa0fe6c5df852',\n",
       " '00159.53acdde1c0b5aadf73295f0c58ddb6a7',\n",
       " '00160.eb0db8e14a3308c08db1cc38c4c7d66a',\n",
       " '00161.e75ee4467e41dd1d5f5156f2b9ca5bd8',\n",
       " '00162.02738313b3d9cf5812167de5493c6852',\n",
       " '00163.550a6ef7fd451fba494cc3128aaf3c7c',\n",
       " '00164.8a0a728a1d5e56631369e5192f0348b6',\n",
       " '00165.a626a87fa5b56f724e6a00e7c1ec163a',\n",
       " '00166.8feace9f17d092d9532e62c35c37ce95',\n",
       " '00167.ae9235b61c9e2fb740bfe4b0b3d703da',\n",
       " '00168.a13640e4b9528891d2e6690008307683',\n",
       " '00169.efbfc0b209eeae7c4c08e5ff14d539a8',\n",
       " '00170.14c40e625814c14dfe2eb997157c6437',\n",
       " '00171.71f0cff94c1091432c43111941bd015c',\n",
       " '00172.de357389925b5094f2e7ff3d1c20deb9',\n",
       " '00173.253a0161257f4fe309df9d9ffabd5ef3',\n",
       " '00174.ea47d0c060fa8ce10dfb448db1f27be8',\n",
       " '00175.04e562a3e92558eef6aa45dd66a96564',\n",
       " '00176.69b5e43c0fb4a313ba18a91c291b3bbc',\n",
       " '00177.22e75f7ffcce4664a3266d90a4b4266b',\n",
       " '00178.e021e35d6b9ec076f35e72ed932356e2',\n",
       " '00179.402096b649c7af65ed3b8b18ca416544',\n",
       " '00180.1d7edb742cfbd5d48881c99a8e03cccd',\n",
       " '00181.6831a0d4a6d648236f7ccd26b5e3e7ab',\n",
       " '00182.8e6541320c6c08e0a899455a0a21f91c',\n",
       " '00183.54d98788fca5892267d8dfe4d09b2bbf',\n",
       " '00184.4534b61b19d6102fe241eecf0a436a35',\n",
       " '00185.d596ca9befa5afe75fd8ebca4c215d46',\n",
       " '00186.7fb6108d51b6cf37e682b16713376f98',\n",
       " '00187.f2e1e617b73fa1c5137d78383372886f',\n",
       " '00188.f416128c8a1bc74ac615e5bdf7ae0172',\n",
       " '00189.b66293957540969a231d2fd09886ee0f',\n",
       " '00190.e26c75eb1c827ea35cf2e3407595fa67',\n",
       " '00191.41a15d7d511bc977b0fcb93cd9492bd1',\n",
       " '00192.9ab41d05f7b9bad7f7eccf7d393293dc',\n",
       " '00193.56c58a594fe8a1e7b830f48eaf12e654',\n",
       " '00194.c2c3f757416af5818ec89cf01a9aa601',\n",
       " '00195.d01606c130956bbbe4d0571e187a03de',\n",
       " '00196.5a8ba13e30d79286b01472ef383d773d',\n",
       " '00197.811a3c4022f3c7c548fcc7df7782e1d8',\n",
       " '00198.abf0f5bd6209bb8e268d51902158e0aa',\n",
       " '00199.05aa582ea00818b07c867878ced559fb',\n",
       " '00200.883884dc35bd45feb65b9a351371a7c9',\n",
       " '00201.190add142b96a42eec8969c51dcf89c7',\n",
       " '00202.fc22c26924eef6d26b3818db4450e2b6',\n",
       " '00203.b5773afbae12d0d79df74b32b2f46697',\n",
       " '00204.5c64400ff51925eb0ca4bc7bdab0bc09',\n",
       " '00205.a7ef07a6046817705ce83f59e2bd3ac8',\n",
       " '00206.5c77fcb0b64166d0fd0795b9d5f7330b',\n",
       " '00207.13171e04f004b9e401b749be95abb2ea',\n",
       " '00208.f6805ede51fb25adfc2bebfa72e70f3b',\n",
       " '00209.d685082621cfefa2f7a2e614b455258d',\n",
       " '00210.a85c0673394ffce41e84cbd558ade870',\n",
       " '00211.3ccf7a2df02a7f7ec7160e29eacfd8ee',\n",
       " '00212.51860640683706a0041c8576cf35fe26',\n",
       " '00213.cbab995631e4345875a326d533cf6cd6',\n",
       " '00214.ccc58960373c957d965f300ace6c9576',\n",
       " '00215.d09b3f3c0df56258c17c3de4dfbfc6c6',\n",
       " '00216.70fc915ba97c52baa07a10c19b89f848',\n",
       " '00217.e2416507f33a5350042484cc38de4800',\n",
       " '00218.17547ce08d682678c539484cf094982d',\n",
       " '00219.642f44312e1eaf0fbecf90d6b39876d9',\n",
       " '00220.7c18420ed3257e8630e67dd0045f6563',\n",
       " '00221.073d8414c8d4801265b1894e139284f9',\n",
       " '00222.09f314ba527328f1537a99a2423af0c6',\n",
       " '00223.02084417d77ed822ef1ba7391a7ff417',\n",
       " '00224.937d82e92fbb4a21cc11cc49310eff39',\n",
       " '00225.13c1eaece69dd93afacadb48189e65fc',\n",
       " '00226.b629152d594cf90a252b1f45dce90a65',\n",
       " '00227.9e23fa007bc1e12a6b957372d24116f0',\n",
       " '00228.6cf71899d7146e93641d4ad9d0aeb34e',\n",
       " '00229.5ee5fd3867d69cd25a5fde771fda0094',\n",
       " '00230.9a0c6d7bc5e78a2b597bc050e491d05e',\n",
       " '00231.b295668c907d5f4d50f8e9db78ae5714',\n",
       " '00232.dba1ba74b7372e3b13b0a351e2d45b89',\n",
       " '00233.46a5a0be6835c796dac95e1c5b691673',\n",
       " '00234.335356ba4b116d347be3199b40cdaed2',\n",
       " '00235.c3a09c057f8fec7d833a8f38062b9a48',\n",
       " '00236.0d42e8e99de86aae42a4f3e3cdc2465b',\n",
       " '00237.885411da9a2cf59e223a953a1747d44f',\n",
       " '00238.dab1868a3b43de1e01ebdfd0e53de50f',\n",
       " '00239.849f683f7532fe3ef85d3ae6cf2d7153',\n",
       " '00240.6430542510c59bcb5e4cca0112eff3ac',\n",
       " '00241.45aeb31a71118db41c3757eee21f8757',\n",
       " '00242.640f27e47a5754dbf4893781ce156a75',\n",
       " '00243.356078a6eb0847e4670477133553b3af',\n",
       " '00244.d6a35c3356b3796b5ddc77ed1b1995e2',\n",
       " '00245.5d4317b10e081f87fd2cd84e6fc94cd7',\n",
       " '00246.b7cc35e095c9fae344813bf6e1bc681a',\n",
       " '00247.e14fcbf137267399278507b469811f0a',\n",
       " '00248.668706b3eca383f610723863786d422d',\n",
       " '00249.5123280972d4935e630a46f92266f6c8',\n",
       " '00250.c99c3af1901ffb471442f3ef4580ffc8',\n",
       " '00251.7b7563dab83993b166e03ab8f052c5ac',\n",
       " '00252.18ef1111d1d7543890e6b0a7eb13e014',\n",
       " '00253.a396ca42887c9f843052432ff1bcbf41',\n",
       " '00254.84ee8f124a5dbb36412c2e2d5cca3095',\n",
       " '00255.11be25bd4a3d55702ed4a1f13e7d2a3d',\n",
       " '00256.53663e6f042c696de327ed117c0990c4',\n",
       " '00257.3e5b4e24045e108fedeff7d6ff8eecc5',\n",
       " '00258.586a8a7ca9e58ea82936ef0487ae8638',\n",
       " '00259.7310c53a2b5baca35187f0ee38aab709',\n",
       " '00260.9c633d54c32d46465f4162f3a91f553c',\n",
       " '00261.9e12183461e1f5e5061eb9f8d39d9822',\n",
       " '00262.ce0f0852efe359866e64ad9a524e51d4',\n",
       " '00263.6be4d6f2afb3d1b5b8acee019e560ce4',\n",
       " '00264.cef5d54bbce2f4a833aab06487467f82',\n",
       " '00265.d0ebd6ba8f3e2b8d71e9cdaa2ec6fd91',\n",
       " '00266.edda19cbe2bb12d6aca8f9550b870824',\n",
       " '00267.332a04bf60ba54e3a303ee253fb977ee',\n",
       " '00268.ed64201ab977eaad5fd6ad999c2f8255',\n",
       " '00269.b2b5cff76f0c1d2811d88cdfc81a2b4a',\n",
       " '00270.d0a83be3891cf0ea26d2af0102e9a875',\n",
       " '00271.b67b5b37ce874d5ccea3391922f14506',\n",
       " '00272.c319ce83bd9b379fda60a7991da1b9d5',\n",
       " '00273.b57629503558401c3945450dc5dfc5eb',\n",
       " '00274.ecbd86ce57edcb6a419a92479216e43c',\n",
       " '00275.4602fde18bf961c7bdff1a65e4e0fcbe',\n",
       " '00276.5068c9f11be01b50bd179e900cee257e',\n",
       " '00277.0b91824bfb092e74957ecff204754944',\n",
       " '00278.143effa95043688280ced372741d3862',\n",
       " '00279.db581b9c25766016fa42b54f426e1838',\n",
       " '00280.c853f6dc1379a418f0a48e7ec7009744',\n",
       " '00281.a143a6b20ae0f54335a78d477b3d82fe',\n",
       " '00282.865809c7b627e9c6f0d5b32b5a80b02c',\n",
       " '00283.3049b55cf228fd4add06e7b701f71878',\n",
       " '00284.74169e544362fc645322f98d1de72128',\n",
       " '00285.c422b202e0487f766ba13baa7b755bfd',\n",
       " '00286.74f122eeb4cd901867d74f5676c85809',\n",
       " '00287.175dfcaba6a69ffe40222e3937308e2f',\n",
       " '00288.3bf1e169fdf5504b8fa28e9998da147a',\n",
       " '00289.759738dc8d12e85d6e26b866faa94337',\n",
       " '00290.98400fc8bb102f11e201c037a613cf85',\n",
       " '00291.69656be850c89e739f4ae1db5b43d90f',\n",
       " '00292.d70b6d753352d01060579b1c34df4e4d',\n",
       " '00293.d74734bf5cf13ea138e4ee4df7555008',\n",
       " '00294.73bcb5b3dfaccc628419d7ecfe69ff1b',\n",
       " '00295.00390d9365839897c097b0db0d0a567b',\n",
       " '00296.fd066cc4153d4d6e65dc8f06165e3f78',\n",
       " '00297.be029fdbe088fc14a8124640f0bb053e',\n",
       " '00298.8b7d79e9cff4860a08188dd3d0c4ceb9',\n",
       " '00299.7e89319a2d14ca28a61ad12fcb49eff8',\n",
       " '00300.e98a210bc3981e1d64524ed9984be049',\n",
       " '00301.48ccf486575754a29b80e4eae2c5e227',\n",
       " '00302.9aa28800eefcb167ac80f4b6b1e939d6',\n",
       " '00303.72eec73b937da55ad1c649c0092f75ad',\n",
       " '00304.d02fe9b0a4d9111f79643c1e0793d846',\n",
       " '00305.4d30f302b0e02fed5944d83cf2de08e4',\n",
       " '00306.a94c65293f1aa18dd41198b867329cb9',\n",
       " '00307.a2256465cea488cb0ffe6da0a2b0fb07',\n",
       " '00308.ba65bb8c48b44b1767ed1c1de1825892',\n",
       " '00309.ac6da28f3f125547c80fb3fccc295f0d',\n",
       " '00310.66b26e342f980a716f81bb66e9b28c92',\n",
       " '00311.44caa311ef0bcbaf2efd0c9a4e09673f',\n",
       " '00312.2909c5a1114ade0b2aa7c3da6960a3f7',\n",
       " '00313.966f088102b6c7932c1a3655abd2a9be',\n",
       " '00314.611159749e214b996589d557e335648e',\n",
       " '00315.57e3c784e646e449c12675f2981a956f',\n",
       " '00316.cec9411f0e3de588aaffde5847356a72',\n",
       " '00317.62e22febb8eeb1d0a49673ddd92b543d',\n",
       " '00318.5b1d22882c6fbfebcebe12a792b3c6c8',\n",
       " '00319.2c5f52556f53f685fc0a72c6c12cd590',\n",
       " '00320.9933c126186ef60960c78df427a2d8d6',\n",
       " '00321.c3dda1549b97568144b8290208504673',\n",
       " '00322.4eeafc78a7cbb0eb92f9030742660997',\n",
       " '00323.8f7195f98946c42be7c95881ad779fbe',\n",
       " '00324.ce7f14e25bb864ee4084ce6179f975fc',\n",
       " '00325.4c10ab2dbc1ca699e7ce7a4f8aa89498',\n",
       " '00326.e77a07ed3bc9f0e54bc12c3ea32e25fa',\n",
       " '00327.f160a103dfff0676aad343813aeab390',\n",
       " '00328.3f61d8085d0a6376ce225b4d9e5630e8',\n",
       " '00329.84bd9e3cd5592c4335ded8736acbccae',\n",
       " '00330.9676b57232270d009783f5276a1efde3',\n",
       " '00331.ccd0a9edb0852f4811a401d533542237',\n",
       " '00332.5f70a83716da60e6dde2cc0c29d0a0f9',\n",
       " '00333.9542450892a144f44e4d63faabbdb27c',\n",
       " '00334.c7dd12784ce69de4bb49147cce037d76',\n",
       " '00335.a48aba9076c75a8eb74f74ae1f9be1e9',\n",
       " '00336.6d3511fa350ee5cf350ec4827fab5100',\n",
       " '00337.2214ccddb3c9bd9cae70fc25dc9b1de6',\n",
       " '00338.e761d6d7c88c70b86e0dc9d7f0003fbf',\n",
       " '00339.865b307b144029f04b1fc94110acdb91',\n",
       " '00340.91d8c92aa5eccc84c40364fc4fc1ed63',\n",
       " '00341.c7f56e7cd829d52190cfd4af810bebce',\n",
       " '00342.e6c781df2ebba44a429b49b86b376559',\n",
       " '00343.81675074f7fcb53fd83ebabd4d158cb7',\n",
       " '00344.99ffe210a9d425a86ab01840bdfd86c9',\n",
       " '00345.20c35f26ff6b56d678fdbe7750477668',\n",
       " '00346.f1d941485f6a20b29329111c59760585',\n",
       " '00347.f133df7e59af41ba1c596e60dde9dc48',\n",
       " '00348.009168209d00ae1cb41ebe3a7f113d4b',\n",
       " '00349.0a6507ca70c84e4beab8698a733970f6',\n",
       " '00350.b01dafc878fcedbeee6a4d7c120ef0c4',\n",
       " '00351.edc235781cd0e2e3b562d868d3a8df62',\n",
       " '00352.986723b3325cd57e893cfcdf992d59b3',\n",
       " '00353.ec01b62420323fffe253643fe0439c86',\n",
       " '00354.2302c4c1801e52a59346a64a5a31ed85',\n",
       " '00355.9fabc0fb3da1d8376c6db0702b60fb39',\n",
       " '00356.f414aefc1fc74d9cd77da0f07f64546c',\n",
       " '00357.d559b71616f64ba1d1c1e61a03644fd4',\n",
       " '00358.df37619f4cc3d224acd6f8e57e67fd24',\n",
       " '00359.dad4917f824800d6623db29ea557b514',\n",
       " '00360.5e45677c7b7a664d516da6b003d9656d',\n",
       " '00361.6a215262fed7b15f657b22c65107eafd',\n",
       " '00362.bfb007d2df523d5e4ad58dfcdbc1b8cb',\n",
       " '00363.64af27f0c753ccf6ec2e9c4e64c14b76',\n",
       " '00364.30f174421507d353f1f602919dec35af',\n",
       " '00365.b73623c2ea40e64854121432f02a5a15',\n",
       " '00366.e6bc462793d21f588e2368dc089399fc',\n",
       " '00367.d44ba629ed6383ee94999179bb6a04e2',\n",
       " '00368.f86324a03e7ae7070cc40f302385f5d3',\n",
       " '00369.f6f9d4cac4af831140abf032d0378365',\n",
       " '00370.0a2e3b397565840b5c4e46d5c5700444',\n",
       " '00371.3d08a5b828fb31bdacd4d07cad065171',\n",
       " '00372.caa02bf9e0bbd7643dbe83fbac984003',\n",
       " '00373.818730ce90950ecbf244e045a713de53',\n",
       " '00374.67d51286926b6af9ae9be32a9e446b29',\n",
       " '00375.205477cf488dba15ec6dbc46011b8251',\n",
       " '00376.3d17aeac1de8eee4383e077b9e0fe703',\n",
       " '00377.6adf708637c5f1dac1822d80ad0a5740',\n",
       " '00378.46432f84e1aab28c26cf1bc5aa2d36bc',\n",
       " '00379.9c4d9f4fb86361e3c21f376f2cbd0ac1',\n",
       " '00380.9426f88747cb44438bb358841649f326',\n",
       " '00381.235df96b897714cb8dd4fdb74113428d',\n",
       " '00382.457cf61e60b0e7fe754a478f2e2c0592',\n",
       " '00383.5b3e8da8353f48bae364fa900109c027',\n",
       " '00384.956b8ffd2bf74442b89dcfc3b3ea32af',\n",
       " '00385.c874a33cb7def0721807ea870e3c31c8',\n",
       " '00386.d929d7bb175845f6eaa3549dedd8a1e6',\n",
       " '00387.1a5243d401fec09abe374e77ad201d79',\n",
       " '00388.18e2a6069150c2c9139f760fda7668ac',\n",
       " '00389.8606961eaeef7b921ce1c53773248d69',\n",
       " '00390.1b4f14e80c8e7797dce79cf5dc22b625',\n",
       " '00391.57ff08c2830235fc1315c1745829d190',\n",
       " '00392.1a94887ca585cbdaeec97524b9308b63',\n",
       " '00393.b7ba3f196286b0c5ce6e5b1ec9078cd3',\n",
       " '00394.608684acea4bef2ae7f5b89309a6046e',\n",
       " '00395.01a60f5f85141b74be6aa6e347feb5d9',\n",
       " '00396.e9b98e25827d06c7a9cc304282011961',\n",
       " '00397.8e97b74b0753e9f56160fc8cb8d933c9',\n",
       " '00398.d6847698229e6211c91085261e0a9002',\n",
       " '00399.a7f6ab4a02fcda6c06662a660a75e677',\n",
       " '00400.ff81f656b45e5f910a2a64116ea00fc8',\n",
       " '00401.fccfd3c52e43aa3512874c3efec9edcb',\n",
       " '00402.8e937401f8a8a7a1c7661e076f96cd55',\n",
       " '00403.bda6864694236a9ec97714233b831c31',\n",
       " '00404.fb2c69f7df37b12bc62737254d0ea36a',\n",
       " '00405.c838c0717624d85d5a53371fdbce5955',\n",
       " '00406.fe97503539c60ff6814fa2fadf1aa630',\n",
       " '00407.11425a14d7fd9c3e1806fd7dc648001a',\n",
       " '00408.d52d0dde484c37acb79bfdc18d4a2aa9',\n",
       " '00409.6219d28fb4f2ca0173e3f76acbbec8ce',\n",
       " '00410.2bd60034fe4c3f781e44ddac87195fd3',\n",
       " '00411.478dc892fbb1a7970a4442fd6b977c25',\n",
       " '00412.2f7375258785a03b8f8ca2adb0c72620',\n",
       " '00413.e637d3bed73c6df691dc86dd61d46192',\n",
       " '00414.c2dee68136358ceec7d235d03185822b',\n",
       " '00415.62ff4ec7f1c4aa5e5ff0d1165892c0bd',\n",
       " '00416.ea1ffcacd8dd84214e745d86a5013115',\n",
       " '00417.7ec0b5a250ddfd52a9b46385688f9f9c',\n",
       " '00418.93eb266673b3731d82ce305ce6f9aef4',\n",
       " '00419.a88b7702054f8fe1ea38daf082124a6f',\n",
       " '00420.04f6a1501e06ccfc93978982ee7ece8a',\n",
       " '00421.805fdd426ce515374b9e0b42a83a4042',\n",
       " '00422.ac4b66f9c3390c3a98d9c8cbe75f403a',\n",
       " '00423.cfe8ba459149d893789505dcac7db306',\n",
       " '00424.9975dd35a0bc8834d9ccd7dfb27ae7e6',\n",
       " '00425.0ba16e840d94d629f8a3881b4e03a3ad',\n",
       " '00426.dbc70af5d406b97fdf70de03697f5a5a',\n",
       " '00427.49db73be9017efca7355ee80f173a26c',\n",
       " '00428.f28828195802a97e84fbace0b81dbe53',\n",
       " '00429.5c83e9a65ee27155654607ee770b8142',\n",
       " '00430.3fc5dbd2463ea79d094b859e9d7e3465',\n",
       " '00431.7f3adeb8cda736429bbe7ee757a07232',\n",
       " '00432.039993123f40c5865c1a9831b3e32297',\n",
       " '00433.881e63c5f176a80aeb5428f36bd0810e',\n",
       " '00434.41010fa84308b599b5ca5b597185a576',\n",
       " '00435.01f1329e5314b30b44b36c20a98ed846',\n",
       " '00436.90165e25df2411e4bef93391f57d2257',\n",
       " '00437.a1f4bc09ef8406e572438adeb849d31c',\n",
       " '00438.e56e66c54e734033b4f014a98615eeb0',\n",
       " '00439.982a2ff6189badfe70c2fe3c972466a2',\n",
       " '00440.02086b5f064e33a48c34183441934bd3',\n",
       " '00441.d98a50dfe00c17a9d864f859480617e2',\n",
       " '00442.d35b7a477107b2e6bcf47f07eca41fa6',\n",
       " '00443.cbff6c2a1679fe0ffa99c07c61c123ae',\n",
       " '00444.eca3cc749e5630f73f2243f1f35563e7',\n",
       " '00445.45f666c21ff201e070e34c0ddc33dbe0',\n",
       " '00446.8305adb883b4b3721b4c9e541d5017f7',\n",
       " '00447.decc7752d5a6bc685e47b094f76bb2c1',\n",
       " '00448.18e06f65c923e685fb4f72d90962c217',\n",
       " '00449.a5774525dc915cffc54433a1793cbf1a',\n",
       " '00450.72b1e6931947f5bfcc7c116431e2a093',\n",
       " '00451.939a31fdd3afff7c049dd3224ced6261',\n",
       " '00452.82e58fa634669d9f5543b297cec9b6b7',\n",
       " '00453.1b26da8f96711b00e186def7371d1e0d',\n",
       " '00454.e4cd59db7f7856303052e3e882be313c',\n",
       " '00455.d88c833e795f29473c862b4e4a43ac20',\n",
       " '00456.6932df857bc1b0c8766e5a9794d167ba',\n",
       " '00457.89579a11f9036c69e46063fb22057fe6',\n",
       " '00458.ad4375d9c03bdcd1828da9c405441b65',\n",
       " '00459.1b37170cbdad7f2ad4051ccff4d2b863',\n",
       " '00460.ae11aa8c20cf158f55b6a180679d74ea',\n",
       " '00461.94c0b7cab722e5ac253b285e50b047e1',\n",
       " '00462.d20502b45c48c8bb613feb09cd9219c7',\n",
       " '00463.4d93152b4c4c397486807b53501aed8b',\n",
       " '00464.5a7f552394a07524c4aa23b06c9e5915',\n",
       " '00465.772004398b9f98bc63ab9c603b10ce08',\n",
       " '00466.cfc9f0d8a4e28c000bc8962d4d3924d9',\n",
       " '00467.db0549489738f320732f286f74986743',\n",
       " '00468.0aeb96f2dc4a95abedb750a6cff7f343',\n",
       " '00469.b1d31cab7c1b3b5897393f46ce62b3e9',\n",
       " '00470.efaf4cc30f0107b82eaee72c68af5bec',\n",
       " '00471.4275aa8908e9754226118eb99aad8c6d',\n",
       " '00472.32120f66ef86d03baf663889b0235d94',\n",
       " '00473.18c8849136c818c42e6429e94bb42f6a',\n",
       " '00474.df7437b06e0b8725f8309196ba8dd09d',\n",
       " '00475.90154e8e3f3761b155d35323f54aaad7',\n",
       " '00476.7133902476448f294ee064117d96c988',\n",
       " '00477.ae6b0e13cfb834b905857a31327dda32',\n",
       " '00478.416296a9700921997bbda37e62c65035',\n",
       " '00479.1bf2cda4c4b42b94b9b0b14ecb9f826c',\n",
       " '00480.a12b636b1444ed8273930c901422c6d8',\n",
       " '00481.a7bee7a7de9cfdb9ad19c88c0440be61',\n",
       " '00482.6967f5ac2b3b99a8c940773658f4c406',\n",
       " '00483.0ce5057dc155d6a6aca6c917b4eb0793',\n",
       " '00484.0196194ad15151d749ec445f38a2ab47',\n",
       " '00485.51303357b6e195501f2bf225d60161b1',\n",
       " '00486.8294dd2af26dd3d759390f412bbec227',\n",
       " '00487.3f2dcd848a26fee4af6be79673ca12ad',\n",
       " '00488.88642710e6c206d0de1d8a0093ed2700',\n",
       " '00489.2a739cd71c4667d635698fff5120bceb',\n",
       " '00490.4734366879f0805c510b6665d99d8fec',\n",
       " '00491.c0d9405bdda12781f96bc37c00a382d9',\n",
       " '00492.3ffb38f175e41790b1f05096dbe339d8',\n",
       " '00493.29a23aaa27a825c8cfb67264b9d7aeb3',\n",
       " '00494.ba6ae1d625f2a4e039f6822868ee48ad',\n",
       " '00495.3bba63110f3a2a97ae71ce53268766cf',\n",
       " '00496.6ebe7969144149d6c8c170732a1b63e1',\n",
       " '00497.d1de10013dcdc07beee6507aa0d274c9',\n",
       " '00498.05456f69b8ce95cc1846f396b73f31b8',\n",
       " '00499.e9a4884055f2ee93c2c0d974c8b2e7cd',\n",
       " '00500.eb1460f32ec4693ed36e356f0401c8e1',\n",
       " '00501.d49136e1973b2bb467093cc28419b214',\n",
       " '00502.19da1b53a1529e45350243255bee8fd2',\n",
       " '00503.8371a5419a277838b32355a79e9d00cc',\n",
       " '00504.9f783e81d6dd916618dc079f58606b8d',\n",
       " '00505.22cfc49506156219ff2e4441d92e077a',\n",
       " '00506.e8f8279bf8b010bab338e085be47dd9b',\n",
       " '00507.accde385fd6700b6e66aaeaf9032bfc0',\n",
       " '00508.80880b09c43a6a31fdf49578eb5692f1',\n",
       " '00509.d5737f6af394368a65215162e3cb23f4',\n",
       " '00510.850dcc2f8864451743299b60cbd4dd5b',\n",
       " '00511.a729fad46d130c7f0990e0586ed25aa9',\n",
       " '00512.c77705cc5e9a878a5c1f5b17583720f6',\n",
       " '00513.8454cc27ffb04db6d63c81e33c0067e8',\n",
       " '00514.d44bd760b7ea720b9d1e1a7ba105e696',\n",
       " '00515.e84988067a252d765f7d24f15c0b0670',\n",
       " '00516.139a390f9320423395da77f14f7118db',\n",
       " '00517.4610bfad0be0872b61a11e2e7786a4e5',\n",
       " '00518.9aaa49b7c1be4cece3992633347b8a40',\n",
       " '00519.595dfd5bc0bec7bd5f06673fc428bbb3',\n",
       " '00520.823579bff3285c4aefe85db5bff0d6c9',\n",
       " '00521.900f67b5696388c58966c58e3aaaf90c',\n",
       " '00522.db4b857b35a54049c2dc88b2516eb1ea',\n",
       " '00523.9fcc28348487963a8ae5f43c3deb4334',\n",
       " '00524.8635e65e0ff007a8d5cc29de21c04cfc',\n",
       " '00525.08f2f03dc58bc667d28140d30c203cea',\n",
       " '00526.27d0075c192b704fd3b804497b8c33d1',\n",
       " '00527.fe739430917f1facd61acbc162d71970',\n",
       " '00528.4069e359640cbe831b602fd3cc387469',\n",
       " '00529.f267247f996b2eab55c6e18b63e3968b',\n",
       " '00530.1a07bbd6fe2438ed2b3f11e92449327c',\n",
       " '00531.711a16c97d6955bdc3d4b09656e44d93',\n",
       " '00532.81180d4d1d632bb50c189b51f83921e0',\n",
       " '00533.ebdd2ab43a73a867388b595061d66d59',\n",
       " '00534.6db349fcd98d25f61e5bcc4552b45f57',\n",
       " '00535.2c21f614f9593edc5049248d6e873ce8',\n",
       " '00536.ee0a85c68f0db6388d6f8a3468af70ac',\n",
       " '00537.0b676300c214afdc2dd6a5007e8b8e2a',\n",
       " '00538.313057481a3b1638c05066fad46ae65f',\n",
       " '00539.f3a3a009e8410ed004b045e724be525a',\n",
       " '00540.c9e660864381381e6a16c599c8f2e1fe',\n",
       " '00541.cbdcefd1a6109b8f95e1c8dddfbd7bb2',\n",
       " '00542.1db9cca8020648c0ed80436b9aea4d33',\n",
       " '00543.0641e755767b41b404070e155708cee6',\n",
       " '00544.5a9365cf80100b89b50656045cb8b80c',\n",
       " '00545.99996f28814c7028ce6aac44270ff3cd',\n",
       " '00546.30fed3b8e986dc41b1865b9285e84e56',\n",
       " '00547.59bf01e07cf08c7e3a778b747e020989',\n",
       " '00548.120e45c5d33311bc09e844bf236521d2',\n",
       " '00549.a847ea8934802a0ec67a7fd1d136d26d',\n",
       " '00550.02e6c81fb637ae555b997d6fd72df731',\n",
       " '00551.1c59fd8e4f3176c859b79b9a75fcc3b6',\n",
       " '00552.2a17c933697e682b93c2f32b66230a3b',\n",
       " '00553.d1e0ab732c8cbe70432e98301e352954',\n",
       " '00554.a01a74aee9653a7ae8d1d558c75f0a5d',\n",
       " '00555.4139b207075574b3774942a3a42013d8',\n",
       " '00556.eea9a26e128c1b4b676b4180adbd547a',\n",
       " '00557.62ed7b82fd342ca4d7932ccee2552337',\n",
       " '00558.95b8c2677759a2f569a5dc0bd70b8cc0',\n",
       " '00559.caa975fbe7e1641a76de679bdf213adc',\n",
       " '00560.e49654efbb65ad7539d43d356457a322',\n",
       " '00561.4fb75fe802e36488a6acbbcccbcde3c1',\n",
       " '00562.3f2a351171504facae22864c794c26b6',\n",
       " '00563.8c8efdf5034a0ba771e48494fd2d8099',\n",
       " '00564.e6fc359c277f507a2e01198b9c60ae61',\n",
       " '00565.4ef76da45577ee17827cec345ac543b0',\n",
       " '00566.4ce66e249726f98555ef3a7ba1f666d5',\n",
       " '00567.aa0b1a5ccd63ce58ca09389b7dd7a5aa',\n",
       " '00568.e5478bfa670cbd9bc3d26ed23e7b3eb6',\n",
       " '00569.d6da87140fd0ef187bcf217a57153cca',\n",
       " '00570.d98ca90ac201b5d881f2397c95838eb2',\n",
       " '00571.8f35c46bee6d7a238eabf207a5696b0c',\n",
       " '00572.c406ac5bc5c42bedbce48f5661d29976',\n",
       " '00573.f36b8bb4af93f6b0736e7475eb6cbcba',\n",
       " '00574.6c736036ab8317e753dae53ef19123e9',\n",
       " '00575.c4b32c1dc29245ce6298f5abf2f0b085',\n",
       " '00576.36892439c0a6bdd5b4231b639b639399',\n",
       " '00577.8f3db8ab8b69d38bddf8e5a91b353da2',\n",
       " '00578.8c710aa944374d631b9969a806e32a30',\n",
       " '00579.566d8e05220571bff1c2f392a1c7bf41',\n",
       " '00580.41f4f9793351fe7c7d3abe77cedc5528',\n",
       " '00581.9922b0f34aa8f51fb4adf4bf4ecf1464',\n",
       " '00582.25153a03da1710fd133d6ff373d612d3',\n",
       " '00583.7db5166f3ec5a8bcf81bf1b639b48361',\n",
       " '00584.1994033689471c5000d715aeaaf7be24',\n",
       " '00585.a55a40c5fca535871d78848d27efd540',\n",
       " '00586.7ca83d6acc8e5b0e44b78a4fe8bab72c',\n",
       " '00587.8d78332c747a44bf017724d66bf71647',\n",
       " '00588.708ecb20113d4c80b91936cd1c86b186',\n",
       " '00589.38f809ae603fbabb0d3f2389011e9150',\n",
       " '00590.3b596d6b2e6ad9b9f5cf3593a398260b',\n",
       " '00591.3bca4fff29ae5e89e2e2948401a24ab8',\n",
       " '00592.9608ca87c212f35feae1ebde5567c0e2',\n",
       " '00593.f71a708b88b51c4d428bb3bd741ece2d',\n",
       " '00594.805dae98d1ad6f99a7792418c1faccfd',\n",
       " '00595.7182665eb052808e2061bacbc75ed5ee',\n",
       " '00596.73c2473a9c778e096f3a9160d72567e9',\n",
       " '00597.d69fd43248612845c272cc277b890e1a',\n",
       " '00598.583ed313ddee00f0dc9929f76d3bb24e',\n",
       " '00599.94c013ab7037d45045aafbac3389bef0',\n",
       " '00600.a1c1bac6e4b69ad676c35512fec98e05',\n",
       " '00601.3db4b70f50e83050fcec38b75dee609e',\n",
       " '00602.2dc7ba42179a34e52badfe383f7fe08a',\n",
       " '00603.712b15c7b1e7bef7235068a3e4d9bd39',\n",
       " '00604.2241c022167d341022d1f345689801d7',\n",
       " '00605.63a8dd42dd6ce5499718d03acfeb0746',\n",
       " '00606.9733a34d34069bbc9671b0292068449d',\n",
       " '00607.5032b5e20289cecc351fc872b92c2003',\n",
       " '00608.36856bbc19336f3fd57897105b32c720',\n",
       " '00609.07f3cfa331e44f1fc138217fc9f9eb86',\n",
       " '00610.ef7ca9c067516bdd7e29aebc488d1edd',\n",
       " '00611.62116da308e2b9eb2e57ee12de12b677',\n",
       " '00612.97d0559a45fd4630e954b8687dfff55a',\n",
       " '00613.b8dd681e75a5583349b54f16991b096b',\n",
       " '00614.2487f80400eb954b7c3ab257771ed393',\n",
       " '00615.4762e05d7ff70fa43cccbad6745b34cb',\n",
       " '00616.1111fc61de078f069db9d72e961ab5a1',\n",
       " '00617.5433c6be9644f6d773afef39392cb24c',\n",
       " '00618.bec430e993398552fbf09c76e04b9994',\n",
       " '00619.b2a33ba25583113a3d435bcbc8759244',\n",
       " '00620.8d1ccac5b4a36e47f5f168c19e6ac573',\n",
       " '00621.2b161b5c7c09b45b568c1982ed49a008',\n",
       " '00622.80ded6eb7b17a2bb45d502b85244dad1',\n",
       " '00623.37932984e4241279e60e9c28f7fd6706',\n",
       " '00624.2847b091fbcbd97af477c23439e0f22f',\n",
       " '00625.bc9f45777515eeeb8da0c8898c0526c4',\n",
       " '00626.349d4ef602ebce0ec03f1505989ab135',\n",
       " '00627.fcd38764f184dd61db99e15081590e7c',\n",
       " '00628.4a185fee450d8239cf82bee902dbd1af',\n",
       " '00629.370fec99ddca8da57ef5cb0bf30375e5',\n",
       " '00630.d4dad4b8734a30afbf8c80499e652c2c',\n",
       " '00631.585978ee5a109ebd04ea2289ddaa3f20',\n",
       " '00632.5aaf2a16e34b00ee971d17bd4343e61e',\n",
       " '00633.a3d861bf0435fda936962c572ce0956a',\n",
       " '00634.3215eb7dfc919ae5ca49520f9fcd43df',\n",
       " '00635.b30f8636725812c0d15a96f31c07f8b6',\n",
       " '00636.f15c6eabe3d5204cb8704b0a4b845403',\n",
       " '00637.0f0bbdfd5cab1e45883719f70f691862',\n",
       " '00638.62a452b9264fb77572bb34181f71a325',\n",
       " '00639.bf2aca6432694667dc120fff4224e5be',\n",
       " '00640.bd6aaf961fe455813d6cd9448c29f312',\n",
       " '00641.96719d053974ef201283237fc146f384',\n",
       " '00642.19131d951ee16af5a157685213dbc7b8',\n",
       " '00643.25062169a6a9d2109b047a95c633f885',\n",
       " '00644.47e9eaa5c1cac5f991f30201ae7fda6e',\n",
       " '00645.2d95a6a89614625aafb7b333e799e111',\n",
       " '00646.866a1abeab0f141ef2de39b398134d0b',\n",
       " '00647.7d9cd4058b01e8b7f5f788e7fc159aae',\n",
       " '00648.d3808dc202cff72d0326d74d23eaad17',\n",
       " '00649.b630711c0f63812f552cbe85b22f4568',\n",
       " '00650.2c20a3ae4da8ff5186f738ee5d833fda',\n",
       " '00651.10adacfbcf0526d9aa331dbecc1a9509',\n",
       " '00652.dde353b33fdd09f8daa33ffcdb016188',\n",
       " '00653.5bf375439fd118575f08b85000c0d3c7',\n",
       " '00654.820dea38bee9162874d734e791ef5ab9',\n",
       " '00655.cf1f1255898932a567c5f7c39faab3b9',\n",
       " '00656.7d0db073b656ae5ecd234e0c59e97623',\n",
       " '00657.9095f1e5c94587ee44a269318647bf4d',\n",
       " '00658.b990e54a957ef200aa8d668dff83e83c',\n",
       " '00659.1217006d88c29f2f900a9406c51feb64',\n",
       " '00660.91d1af396b1bc7b8703f5fae9de020d8',\n",
       " '00661.e779083f6d4522af5231edf0b9371a1d',\n",
       " '00662.020708cee6e991e3c3a58aa83df7f8d0',\n",
       " '00663.cbfae39e27122415329840060e7619e8',\n",
       " '00664.dd3769251f79f493bd990b8c3f870f24',\n",
       " '00665.f1547d981d26d8c8ccfa9375dcd7d222',\n",
       " '00666.9f288224f19ca69b2663b5b9a85d8d62',\n",
       " '00667.dfa0ab3eb4214034892b8cda76d9d750',\n",
       " '00668.c788422df192a179d3a6ddbcb8b8b612',\n",
       " '00669.1324e7460b86ccd5cf81ea949704351d',\n",
       " '00670.be029e37187b8615a231865e3663dcf9',\n",
       " '00671.daf16d838d9b71f5f6cf09d54ebc1e3c',\n",
       " '00672.f7e4f9c91f81b7506b0e9a22ef1fdfe5',\n",
       " '00673.aa68749868d6679697146490282dc908',\n",
       " '00674.6dcadfb64e1a333f826a1c7b5c722f5f',\n",
       " '00675.2b3aefd8378ddbd20396c4b9d961a0bd',\n",
       " '00676.5a7325cc70b1732867ec5b831da86eca',\n",
       " '00677.b957e34b4dd0d9263b56bf71b1168d8a',\n",
       " '00678.28c4d8cffba35f7a4fa077efb4836fc0',\n",
       " '00679.7c3eae8e28aadb8ea378fb5c04bc5d29',\n",
       " '00680.fba9fe0db5780caca8155fb4defdc679',\n",
       " '00681.fd01c0551b4b72201697bfbd55bccd25',\n",
       " '00682.7b96194cc45dfc4d54679a198dda3244',\n",
       " '00683.7d0233053c9421fe2bf29e23a4aa5b18',\n",
       " '00684.1969c6baadceb721cc2a565b93e7f63f',\n",
       " '00685.0c2b26b54c5bb9e9072515d58ccc14ea',\n",
       " '00686.24376d10c9d96b5aad34a8ed8e6b7586',\n",
       " '00687.a044e978152b1411bd3ea6ddc0f537b2',\n",
       " '00688.b05bdac7f180a6947d701b974b413dec',\n",
       " '00689.baf30774fe011781f6822746345015d5',\n",
       " '00690.f56ab439b3ce565dd3fbbefa5fefd0bc',\n",
       " '00691.fe0daf79c97e1e314de953d18efc37e2',\n",
       " '00692.9761f9740766106c5f982e773069a76d',\n",
       " '00693.6849440c3e1d1584a9f05b067d0062aa',\n",
       " '00694.d04cd6e81d2ff9a678a18607d32e229d',\n",
       " '00695.4ea4110f03a11a6f24b27420647d375f',\n",
       " '00696.767a9ee8575785978ea5174d3ad3ee26',\n",
       " '00697.edd28212eb2b368046311fd1918aae7d',\n",
       " '00698.09cdefd75c1242540db1183f9fc54461',\n",
       " '00699.29e599983f044aee500f3a58c34acffc',\n",
       " '00700.7eee792482a5a8cf20f1e4225f905f6b',\n",
       " '00701.4c1a296394c3afdcb38020e8283d1a5d',\n",
       " '00702.bf064c61d1ba308535d0d8af3bcb1789',\n",
       " '00703.ec6e20ebdbfec16d51db2989785583ed',\n",
       " '00704.e077ad131955ba1fa3b9ba7a68b78f62',\n",
       " '00705.e481bd3281b960fad92e6dfaeb567d14',\n",
       " '00706.a5e10c660dcdf09e6e760d87c0589b9b',\n",
       " '00707.72dce8440a545f840d53765a11adce4f',\n",
       " '00708.d3270ed75122fa3989cec02ffb5b3066',\n",
       " '00709.ab6879788945a66541ed05b4f23edbed',\n",
       " '00710.ab32156df4d26cf061b7e553b51547b5',\n",
       " '00711.cd5fd593ba9d0f75c0af12f4fd2d64f0',\n",
       " '00712.89e45eecae00da0b8207bc79d2e843f1',\n",
       " '00713.7b4a3ad6c8b6bbcf358ee5ee23dcdc12',\n",
       " '00714.16c4d34ab2c9622fe82de9570946f9ef',\n",
       " '00715.ca0843463580080429cb2d0192b9ce0a',\n",
       " '00716.c0e0c922db8f605b6475839d8fec9985',\n",
       " '00717.041b5d95813b24c07616f52509bb9fd9',\n",
       " '00718.1fc4cf16dbe6d0395c754671b24782e1',\n",
       " '00719.6d73cfb0bea6fe5002fbd3b260d480e6',\n",
       " '00720.60fb431980df487172ca5ba412bbedc4',\n",
       " '00721.9f0c973b343b808cdf4ab26c9e9b3b50',\n",
       " '00722.6520838870f11a569a006ac7e119782f',\n",
       " '00723.e72e8e80f67f30983c089943e184f5e6',\n",
       " '00724.06d186a9890c1bc07b1e0bd89b7efb8f',\n",
       " '00725.5d2dec63252bb5fc57f3de280129656a',\n",
       " '00726.96933510684f33c2eea5711f969fe444',\n",
       " '00727.ea5bab335cc61c1d3d85a8566232f5e8',\n",
       " '00728.b5de363dc254b32b4a44fc37743d9322',\n",
       " '00729.d8f3ba695fd4f3c1ac6361f2e118ae55',\n",
       " '00730.b2c9b979063d66d1a14f8d834a1c6dfa',\n",
       " '00731.23dbba60cc6ea56f735599461109200d',\n",
       " '00732.3ed34429d759468e94c14ca1e2bb231c',\n",
       " '00733.8cd99b24ae020e6028d85ad0c4f06186',\n",
       " '00734.e37922bdfd9e3246c18322e4b07a4b23',\n",
       " '00735.97b119b8e994bfd0c9a3455b407e52a3',\n",
       " '00736.ca47a5a3b86318e4f1ae4d6bcaa7fc80',\n",
       " '00737.fe2d8d182d9bc421411c9ca9012f3afc',\n",
       " '00738.5c6ce770da4cc06ebea777b8be30abaa',\n",
       " '00739.9034df113ffe0cff225c698efcea7426',\n",
       " '00740.aef9889d927eccf01a365d72db48882e',\n",
       " '00741.03396e9c6182ba4f821ba2cd3740d1e4',\n",
       " '00742.1be305d2baafb0b3699c2750ee546787',\n",
       " '00743.1ee0d64b26edd4ab988d5b848232f554',\n",
       " '00744.667c8aba4400684b27c339f72ad86968',\n",
       " '00745.d2df6fc9d5de220dc9b34cf04addf9e2',\n",
       " '00746.0ca47650bbc1a73fcfdb519b04fb635e',\n",
       " '00747.39967f26d6c1cba3713e2b9f318d0531',\n",
       " '00748.d6ca40c29f4224487fc8d802cb5dca88',\n",
       " '00749.5f32bf86d99139f3256aa4afdd607f58',\n",
       " '00750.5bf605243948976794d149274a18159b',\n",
       " '00751.1e509bcc1e777532f90081474defea62',\n",
       " '00752.3ce51c783c3d6160d34de35e429dc470',\n",
       " '00753.880e08a60a1c96760d26d37f2d6b1cbb',\n",
       " '00754.35836a337d451aa3b7cfc7a7e617c2b2',\n",
       " '00755.798a2e0b9045d90a9bddbb501dc1fcfb',\n",
       " '00756.286dd5a4431bc1a94af390a6bf4d0349',\n",
       " '00757.0c98cd042bf54bed37dc526f0b57bf26',\n",
       " '00758.af02ef2952273218fb9d6c7ddbec7910',\n",
       " '00759.1c5ec35412195e0c2d80ae829d68e8e9',\n",
       " '00760.705760ac23c26098abf407bfdfd30499',\n",
       " '00761.b4bbbb76fb1fa8407236f5cb167c33d8',\n",
       " '00762.c95ecbfb41e18e9ae4b9aceb4a7de176',\n",
       " '00763.509a13b8ff69430aacaa8b786b322939',\n",
       " '00764.13a2828e7c0475a4d67413331b3f7b2d',\n",
       " '00765.ea01c46568902b1338c9685b55d77f6c',\n",
       " '00766.9ac5716a891643ea31d43388a282cbbb',\n",
       " '00767.d5b223070f2a19834daa88bc4338354d',\n",
       " '00768.ce54703f83eb3bf04a04f665dbf55e96',\n",
       " '00769.25bf9a767b5db0ed93f03c1637281663',\n",
       " '00770.b6b328aeb18316cabd60aa75025771d0',\n",
       " '00771.2ce14d08f77127e0720658404cc4ce11',\n",
       " '00772.ab8da3bd11afb162b0ccbd65edaf6cc8',\n",
       " '00773.d8b19e7b6c9a53f4f37242b3f1ca1276',\n",
       " '00774.1af9be3cd1aba6a371ee11dacc7d1025',\n",
       " '00775.0e012f373467846510d9db297e99a008',\n",
       " '00776.20cdc88a69e453f1ef0dd3b5f55cc717',\n",
       " '00777.5abc0824f35b966cf589b15c4f10f2d2',\n",
       " '00778.d83af9d544ca2957ea6f326728ad004c',\n",
       " '00779.d5e815dc2dda6819f41227fce324b31d',\n",
       " '00780.3c407d4d7361184c739b0346741036dd',\n",
       " '00781.f2f409be2c85d1303022b58db1551d85',\n",
       " '00782.6600ba2aef2816e4852a4c8e43130591',\n",
       " '00783.14a724489223eda0063e308c6914ee38',\n",
       " '00784.372fcb5f8a0507aa4a8fa0de1e76fe79',\n",
       " '00785.95b5f5d3a4210fd76015c4659c5b3ca0',\n",
       " '00786.ca79d7745b67c62712e5a5553c3b83e1',\n",
       " '00787.2ffb20c151e974ecf6dceb42547761d8',\n",
       " '00788.cae8367898a24746723decabdd20ac38',\n",
       " '00789.87278efee0d73a7e902af35c49084230',\n",
       " '00790.226ce4b62d85d7ca13f3f837b731b082',\n",
       " '00791.0150510afcb54992415d2eff33d5a8cb',\n",
       " '00792.f321af7901fa6c9e85362d921eadf2ae',\n",
       " '00793.6da29475fba399c38bb0a93efabcae5c',\n",
       " '00794.ce4c417f911968e4be6ee1203db0bd94',\n",
       " '00795.ea9b54832cc27bb552e483a6aefbde47',\n",
       " '00796.1c06b1656c17f8aa92a42a82ef0ad2e9',\n",
       " '00797.f9905519971d08a70a6d9815016f8295',\n",
       " '00798.789e730c08cdcd58675c1f273fe507ab',\n",
       " '00799.160a04b5935b5a9610b4dc15951b5d30',\n",
       " '00800.0a94761ce8069732112ac9fe52b14e9d',\n",
       " '00801.0a1ec38cd598d6c2e02323487c74e53c',\n",
       " '00802.c2f1957d9e67ae45f06a7c0845b02f3f',\n",
       " '00803.a9faabf181ecae3ece9f7003a005aeea',\n",
       " '00804.a27b268d92e03d488d534b6e69d98f43',\n",
       " '00805.15e21951a8e03def748ffb6b0de7220a',\n",
       " '00806.eed01b7d2bc05e5490e75f366a534353',\n",
       " '00807.ee4df461634d0e9d9c7ef72046c3fa2c',\n",
       " '00808.1398044c30f7120129aed031ce56ba58',\n",
       " '00809.93dfdb8801515083fde97a7fe6c921e4',\n",
       " '00810.a290b36b1210ae7d5ad8d224aef851bf',\n",
       " '00811.caf6de89b99d2266288dfeff16359be3',\n",
       " '00812.5c9165b987d6010d672516ea28ffe213',\n",
       " '00813.3bb7842dbc6ea433e2fa5fb94f3d2571',\n",
       " '00814.6095f126eed33df37a63e3a37b2728fb',\n",
       " '00815.141d4c82a4df4a06f0c0967a608109e6',\n",
       " '00816.5fa114769164d0ff93317bc714a3f68f',\n",
       " '00817.6dd747cab2629ac615233a528525bb8f',\n",
       " '00818.02224a14a25dd7014fd4f48518f48e5b',\n",
       " '00819.cbb61ae5d168944f5a02eccfd7217173',\n",
       " '00820.13f6cb2d10777d8b8ff18399657607e8',\n",
       " '00821.610507766f9b9a60431a96042fc135a5',\n",
       " '00822.9d70f64546100d8f04b7394760cf512b',\n",
       " '00823.187ae0372c96a338a86a19fc3215010d',\n",
       " '00824.77239fe11a4e1336ea49ba0bfc2de54b',\n",
       " '00825.49de040a4a48997da11b0e751d40c211',\n",
       " '00826.6ab31aba455701b24c69fd1f6dd59184',\n",
       " '00827.b863d1780c6c6ed248a3e9136bd52b72',\n",
       " '00828.709e1ec58a2bf04455cdf5c0c83f444c',\n",
       " '00829.7c74d7c59a6a5f0d0e54562ef671d14b',\n",
       " '00830.3a2cadbd29e654a7cbbf64ba4bdc378d',\n",
       " '00831.dfa70bbdaef79d5863917ba90097ba7a',\n",
       " '00832.e30b18b8b964c0252bfcfbfe2b99efd6',\n",
       " '00833.cc61a5d9b6ac040ef4ce65d1ee5ec069',\n",
       " '00834.a73f96c83f5f638954df85ede58a3709',\n",
       " '00835.9068443a73e2e4b91c9117ef9b022675',\n",
       " '00836.0270377f02e23355cca97c0805001c03',\n",
       " '00837.d989d85087fd0d2297bdfc4c4d9039fb',\n",
       " '00838.5d38f350c098436eb6d9cccda1e054e2',\n",
       " '00839.e4777b19e2429f9cece122c1d56998d8',\n",
       " '00840.fd947072df20db5eebb0d015f20073a4',\n",
       " '00841.d62d1f4d0dd8f02d0595dd52875776ef',\n",
       " '00842.85c0352fd0fd5ed7b6008fbe62b42bb2',\n",
       " '00843.0c778329d09499853d99746d0f6f2dc1',\n",
       " '00844.4af56580a8f02ae25ec39faffafba8ce',\n",
       " '00845.c74b7d7bdbbbab316dcb7498825bba9c',\n",
       " '00846.cd171eed5306de66f8ebf444aa61e718',\n",
       " '00847.f752ba326e2f6670fb6fecc5fd655d3a',\n",
       " '00848.a99e7c1ff97407816f4c0b323421b5c9',\n",
       " '00849.5ff774a5add00c6739307f6950b4ddf5',\n",
       " '00850.9435ce0e094b16d0f2c9c458f2900706',\n",
       " '00851.51d3571c945fd64a210d477de46e14b7',\n",
       " '00852.8be48f515c9ecb089aa3fc5983eaf038',\n",
       " '00853.8b209d0398d8c0f76b676097759e24e5',\n",
       " '00854.357b5bdeea553ec020631b131b7e2278',\n",
       " '00855.8e0647984e6592b6400021a5b87ee133',\n",
       " '00856.b71f98991ee068f642498810ba0c5383',\n",
       " '00857.cea46b6fc4077476d49923b4d56621e7',\n",
       " '00858.54a727ce6b2e452f05e2719d99393999',\n",
       " '00859.54a8c500034dd8056834ee17cec9c4cc',\n",
       " '00860.a2a3bca553c3ec8e6ce24f45b3f2a9a4',\n",
       " '00861.6e526bc95d6eb4736211696fec13d9f0',\n",
       " '00862.b3e793b7c8e41cd45a0eccaa7abaf722',\n",
       " '00863.f20cfe969a2e3162ce6ce19fd80188bd',\n",
       " '00864.95da38aac2ee9c6c8d36d0f2f1e8c8e5',\n",
       " '00865.ffa802dadbaca77b74f05cc1c23c30bd',\n",
       " '00866.670508b848fa453d194f443f4737b351',\n",
       " '00867.9e8b300d814c941ba6bbedba138239f0',\n",
       " '00868.f6059340a945c22b175f306ee79e674e',\n",
       " '00869.96acf5a2b0543fd7c1767e5562891eae',\n",
       " '00870.cf6be25af593cc88d0c7f58e7deccea4',\n",
       " '00871.f3bb3f8e157f00992af581a509234858',\n",
       " '00872.b037dfd3ef82cc1690c6692ed42c4dd5',\n",
       " '00873.9fa4518a4adfab3e6b194ee33a89b2e0',\n",
       " '00874.d9f0374ce55cb5e03ca46a5459894e34',\n",
       " '00875.b8e33b6137c804fbf4e77135aeae2283',\n",
       " '00876.f075a944de6d2290fd7a1965ac72d94f',\n",
       " '00877.fb94c382f9f10548db78b9d0339621e7',\n",
       " '00878.23aea042030421f155edaf41a36b3701',\n",
       " '00879.798415ecafdee535a11c68481f5d66b2',\n",
       " '00880.146f15b727deb84e2459cecd3fd67088',\n",
       " '00881.c1a373126fc964123ffbc018433b21d5',\n",
       " '00882.7d2cb3dcfbe9ae110726e656347c0628',\n",
       " '00883.c44a035e7589e83076b7f1fed8fa97d5',\n",
       " '00884.48ae15dc5f48f6caafa8c235d148782a',\n",
       " '00885.5923b3938b5b422e7d514cc4bf403316',\n",
       " '00886.6d792e0aa2cd6975ef5e050f7b0173b5',\n",
       " '00887.07d5efdf4a700dc6d1a7926e0008e57f',\n",
       " '00888.b1cc484869abb3e20ae3843f597dc307',\n",
       " '00889.8f1ca88d8dc661c9ffcd25a2104efe7a',\n",
       " '00890.85334af70442efdbf0b83768fb1d2eb3',\n",
       " '00891.e165e538480dcd42dc62b43b7622ecb3',\n",
       " '00892.9dc7dadb7e1258d9d1256673f2ae741c',\n",
       " '00893.6edf02e68e0e172b2142e5a75d467057',\n",
       " '00894.5b21597d342d44631ebc33acf460883c',\n",
       " '00895.0c7898bdc5199ca3efd6af04c80430d0',\n",
       " '00896.73f4eb6d676530f00ca391dd522034ac',\n",
       " '00897.116b99f81aa0d54498bca28abf4c29ab',\n",
       " '00898.611a5a9738e5905aaff6344c1cdaf32a',\n",
       " '00899.d7f9c80cf9bbd1355322a75886903b65',\n",
       " '00900.04d3fc4b18f2def855155994cd956529',\n",
       " '00901.dd49a05f9b0b28396c8a91b5b2fb0e2a',\n",
       " '00902.1e45b913616e9e1f42bab6b6f31ea830',\n",
       " '00903.49d4e076baf5a4d6272fa9a4e510dc5b',\n",
       " '00904.42d2e7951496bc3b1ee4b67185ce2746',\n",
       " '00905.05268a196c3e0e6464a45e41958a4554',\n",
       " '00906.bdc0d543b54cc81cf378c33bdfa39d4d',\n",
       " '00907.647447c8ce096234074b65ea25655a10',\n",
       " '00908.0be94e6d9ef62596e0dd488fc4d98b8f',\n",
       " '00909.777e83e14a0637cb3ffae7b5c8b0e77f',\n",
       " '00910.ba4833ce4dbc0ae64d1c148cf41aedcf',\n",
       " '00911.dcbdde154d9f25c1afe32f4b8f5f1f9b',\n",
       " '00912.f7faf669f2794a54dd91d62e7ac3b904',\n",
       " '00913.bc83c1f37836dee281cc5282e61acdee',\n",
       " '00914.a24840d53c5f49a00e66fa4425e4626d',\n",
       " '00915.22a9c52df39c264be488f62bba9d621c',\n",
       " '00916.1ea7a40e892220d43795fee49ab4849e',\n",
       " '00917.b633b615b29b9483b6e3ec54dd6914b9',\n",
       " '00918.4fb416f486e8b21ffe522b4074598b69',\n",
       " '00919.3ca1925f3bab9136611b8222f8cb047b',\n",
       " '00920.d7c069763cedddefa021e23cae0dd259',\n",
       " '00921.0407865778a278e577c287a9a04763a7',\n",
       " '00922.699506b21f6625eaaa1482c7fa034e1d',\n",
       " '00923.1a2af021ec7490b689a04ecd0226f9d5',\n",
       " '00924.4dbdc2c81ad764bfe29627498857b6f3',\n",
       " '00925.f32ef12bc4c8a7f4831cdfecd3b743e5',\n",
       " '00926.11b20c87f289b3743af174cd5a1d2c4f',\n",
       " '00927.acbc1da1de97d9257d57b4f46ed7a3f4',\n",
       " '00928.83cc6f8987cb3dd6090a8928f04bd608',\n",
       " '00929.8de0f155d0404d74ae006c0edff6b957',\n",
       " '00930.dd136d3d36e14ab324b79c3cf8c9e6e2',\n",
       " '00931.c27bf5c9bcb24c213aafe1b28fcbcc7a',\n",
       " '00932.659c11cb26c11baa33395f6f6c363ef6',\n",
       " '00933.20b1ef5013048f152931fb6c4e92e9ce',\n",
       " '00934.f9ba910a655535304bf26a3e281cb324',\n",
       " '00935.8ecbeab3ef30caba2c29e25744a2265a',\n",
       " '00936.e8fd8c240b680e948f85f2326cc87250',\n",
       " '00937.1442bfa30552275d60548860104339c3',\n",
       " '00938.e1a61251ecebf0f323c7815e68bdaa27',\n",
       " '00939.e48ae1c641ef0958595719db1befb0d9',\n",
       " '00940.2d6167e70e2aaa01e531409f1dbdd551',\n",
       " '00941.6805692546cf6517f808151dcc9dd6f4',\n",
       " '00942.727cb1619115cdee240fa418da19dd1f',\n",
       " '00943.c87bed16cca1b008f6e796a9e652ddbf',\n",
       " '00944.4c4f3aa0e543af3cab4859ad1b1b16be',\n",
       " '00945.e6eb589db145071f678c95f19b162b9b',\n",
       " '00946.36ac3a6b0fc1b34bb8c125fe75cff193',\n",
       " '00947.488310e3c7ba27ec9d99d390007b8c53',\n",
       " '00948.12717d1c7815c5e226f5b4324220dcd8',\n",
       " '00949.5a860f580179b99a227c4064ac28724c',\n",
       " '00950.552f3425d82204ce19d468127085b7d9',\n",
       " '00951.23649926ba46e21259b518be64d300af',\n",
       " '00952.61bd88dce9acd2fd68dfd2c2e2d9b675',\n",
       " '00953.39959392b9ccbbcbcacdb4211f2986f0',\n",
       " '00954.64e0c6e4f6fad8027420d8082164331d',\n",
       " '00955.34c902aff03e7a4911b6d5e378f69635',\n",
       " '00956.f566e64727b8f438aa73ee8d26e8f31d',\n",
       " '00957.7a0420bc5e7ed1ce8333c98dc766e702',\n",
       " '00958.82f86525742d7ae45f4e6a9df49fb674',\n",
       " '00959.68fb2328c01cd34b7e0f1763c85f9c66',\n",
       " '00960.c4805da3c25d516184adc9343144c909',\n",
       " '00961.509b19e210cc3cda4ae6615a47663d68',\n",
       " '00962.52e0a3b43febe264a7010803f7909f88',\n",
       " '00963.0cc9003be43ed6a642376156e98f5fb1',\n",
       " '00964.4c5e48c8c2668559fbc379616893f3a7',\n",
       " '00965.5732172f491041028b563a9c919d9b4f',\n",
       " '00966.2a4fb2559839748a35516c870f765211',\n",
       " '00967.e95bd7ad9ef796e4b8f762d898bfc690',\n",
       " '00968.747f6cb40f4a18a2e7185454549d06c2',\n",
       " '00969.2d5fb4b3c8c376b12157cc8e0a2e7111',\n",
       " '00970.b567daf8f05ff88b2cc4418bdc993913',\n",
       " '00971.5b0ba338d08a9077b1256678781e4a93',\n",
       " '00972.b94b5871ba0d2d042da63d0fcaa2fa32',\n",
       " '00973.42545038686536033b1032380502ae09',\n",
       " '00974.e075ae7ee23cfacb24d0d1b59ae5af83',\n",
       " '00975.23aa3095e145bf342502ee60bc602c28',\n",
       " '00976.13ecce82e8d787ee17ae688d4c70737d',\n",
       " '00977.8046655ae38293b58a69a94389f20020',\n",
       " '00978.a136387f15961a4f0a2c0ca583206199',\n",
       " '00979.9eef0c20fa5a680d5d4d5b752bbf9453',\n",
       " '00980.c44ba5c1509adaeba8e9e496c91aef25',\n",
       " '00981.3eb28c739b5443730f65626c58e3995e',\n",
       " '00982.4e1d46e8b99725e70515f1df7410aa44',\n",
       " '00983.42eb62cc4057d03dfd3eb1c8afc270e2',\n",
       " '00984.6f4ec805e2e78d5310e0a4ae931e67b3',\n",
       " '00985.e20b9f4f171d907fb8d8439584fe03b1',\n",
       " '00986.93b7eb74f26330872be1d58ec9d2b64c',\n",
       " '00987.88641ac821f19f26060f12197bc585a4',\n",
       " '00988.2154210bb53f94daded7a622e26225a1',\n",
       " '00989.59155225507b38fbee48407ebb6cc68d',\n",
       " '00990.ee34876c3873d8e6197432ad9c558429',\n",
       " '00991.ec5d16cf8c633a2f15b8f98a39c58a60',\n",
       " '00992.4a6d6d9013a804213fff718806aaae49',\n",
       " '00993.041d0d8e108657fd1ba5c605a10e2bfa',\n",
       " '00994.63ad3cd73487972bfc2eb3e78e2e7cf9',\n",
       " '00995.11200ae0fc914c7056dcbf7dcfb4c107',\n",
       " '00996.01a4386651fb07928d2314d8690e61cf',\n",
       " '00997.3e7c9ac060fb43183adc891520f41ce0',\n",
       " '00998.84daa7907ccbbee4f20c4da1288cb196',\n",
       " '00999.c78296e77769d280844fe48f2f3babde',\n",
       " '01000.bd0b18ad8256a7cb29f5508a20cd19ba',\n",
       " ...]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ham_filenames"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "import email\n",
    "import email.policy\n",
    "\n",
    "def load_email(is_spam, filenames, spam_path=SPAM_PATH):\n",
    "    directory = 'spam' if is_spam else 'easy_ham'\n",
    "    with open(os.path.join(spam_path, directory, filenames), 'rb') as f:\n",
    "        return email.parser.BytesParser(policy=email.policy.default).parse(f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Martin A posted:\n",
      "Tassos Papadopoulos, the Greek sculptor behind the plan, judged that the\n",
      " limestone of Mount Kerdylio, 70 miles east of Salonika and not far from the\n",
      " Mount Athos monastic community, was ideal for the patriotic sculpture. \n",
      " \n",
      " As well as Alexander's granite features, 240 ft high and 170 ft wide, a\n",
      " museum, a restored amphitheatre and car park for admiring crowds are\n",
      "planned\n",
      "---------------------\n",
      "So is this mountain limestone or granite?\n",
      "If it's limestone, it'll weather pretty fast.\n",
      "\n",
      "------------------------ Yahoo! Groups Sponsor ---------------------~-->\n",
      "4 DVDs Free +s&p Join Now\n",
      "http://us.click.yahoo.com/pt6YBB/NXiEAA/mG3HAA/7gSolB/TM\n",
      "---------------------------------------------------------------------~->\n",
      "\n",
      "To unsubscribe from this group, send an email to:\n",
      "forteana-unsubscribe@egroups.com\n",
      "\n",
      " \n",
      "\n",
      "Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/\n"
     ]
    }
   ],
   "source": [
    "ham_emails = [load_email(is_spam=False, filenames=name) for name in ham_filenames ]\n",
    "spam_emails = [load_email(is_spam=True, filenames=name) for name in spam_filenames]\n",
    "print(ham_emails[1].get_content().strip())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 拆分邮件各个类型的结构\n",
    "\n",
    "def get_email_stucture(email):\n",
    "    if isinstance(email, str):\n",
    "        return email\n",
    "    payload =email.get_payload()\n",
    "    if isinstance(payload, list):\n",
    "        return 'multipart({})'.format(','.join([get_email_stucture(sub_email)\n",
    "                                               for sub_email in payload\n",
    "                                               ]))\n",
    "    else :\n",
    "        return email.get_content_type()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Counter({1: 1, 4: 2, 2: 3, 3: 2})"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from collections import Counter\n",
    "    \n",
    "a = [1,4,2,3,2,3,4,2]\n",
    "\n",
    "b = Counter(a)  #求数组中每个数字出行几次\n",
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from collections import Counter\n",
    "\n",
    "def structures_counter(emails):\n",
    "    structures = Counter()\n",
    "    for email in emails:\n",
    "        structure = get_email_stucture(email)\n",
    "        structures[structure] += 1\n",
    "    return structures"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('text/plain', 2408),\n",
       " ('multipart(text/plain,application/pgp-signature)', 66),\n",
       " ('multipart(text/plain,text/html)', 8),\n",
       " ('multipart(text/plain,text/plain)', 4),\n",
       " ('multipart(text/plain)', 3),\n",
       " ('multipart(text/plain,application/octet-stream)', 2),\n",
       " ('multipart(text/plain,text/enriched)', 1),\n",
       " ('multipart(text/plain,application/ms-tnef,text/plain)', 1),\n",
       " ('multipart(multipart(text/plain,text/plain,text/plain),application/pgp-signature)',\n",
       "  1),\n",
       " ('multipart(text/plain,video/mng)', 1),\n",
       " ('multipart(text/plain,multipart(text/plain))', 1),\n",
       " ('multipart(text/plain,application/x-pkcs7-signature)', 1),\n",
       " ('multipart(text/plain,multipart(text/plain,text/plain),text/rfc822-headers)',\n",
       "  1),\n",
       " ('multipart(text/plain,multipart(text/plain,text/plain),multipart(multipart(text/plain,application/x-pkcs7-signature)))',\n",
       "  1),\n",
       " ('multipart(text/plain,application/x-java-applet)', 1)]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "structures_counter(ham_emails).most_common()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('text/plain', 218),\n",
       " ('text/html', 183),\n",
       " ('multipart(text/plain,text/html)', 45),\n",
       " ('multipart(text/html)', 20),\n",
       " ('multipart(text/plain)', 19),\n",
       " ('multipart(multipart(text/html))', 5),\n",
       " ('multipart(text/plain,image/jpeg)', 3),\n",
       " ('multipart(text/html,application/octet-stream)', 2),\n",
       " ('multipart(text/plain,application/octet-stream)', 1),\n",
       " ('multipart(text/html,text/plain)', 1),\n",
       " ('multipart(multipart(text/html),application/octet-stream,image/jpeg)', 1),\n",
       " ('multipart(multipart(text/plain,text/html),image/gif)', 1),\n",
       " ('multipart/alternative', 1)]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "structures_counter(spam_emails).most_common()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Return-Path : <12a1mailbot1@web.de>\n",
      "Delivered-To : zzzz@localhost.spamassassin.taint.org\n",
      "Received : from localhost (localhost [127.0.0.1])\tby phobos.labs.spamassassin.taint.org (Postfix) with ESMTP id 136B943C32\tfor <zzzz@localhost>; Thu, 22 Aug 2002 08:17:21 -0400 (EDT)\n",
      "Received : from mail.webnote.net [193.120.211.219]\tby localhost with POP3 (fetchmail-5.9.0)\tfor zzzz@localhost (single-drop); Thu, 22 Aug 2002 13:17:21 +0100 (IST)\n",
      "Received : from dd_it7 ([210.97.77.167])\tby webnote.net (8.9.3/8.9.3) with ESMTP id NAA04623\tfor <zzzz@spamassassin.taint.org>; Thu, 22 Aug 2002 13:09:41 +0100\n",
      "From : 12a1mailbot1@web.de\n",
      "Received : from r-smtp.korea.com - 203.122.2.197 by dd_it7  with Microsoft SMTPSVC(5.5.1775.675.6);\t Sat, 24 Aug 2002 09:42:10 +0900\n",
      "To : dcek1a1@netsgo.com\n",
      "Subject : Life Insurance - Why Pay More?\n",
      "Date : Wed, 21 Aug 2002 20:31:57 -1600\n",
      "MIME-Version : 1.0\n",
      "Message-ID : <0103c1042001882DD_IT7@dd_it7>\n",
      "Content-Type : text/html; charset=\"iso-8859-1\"\n",
      "Content-Transfer-Encoding : quoted-printable\n"
     ]
    }
   ],
   "source": [
    "# 正常邮件多给纯文本，垃圾邮件大部分是html\n",
    "# 查看邮件头\n",
    "\n",
    "for header, value in spam_emails[0].items():\n",
    "    print(header,':',value)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Life Insurance - Why Pay More?'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看主题标题\n",
    "spam_emails[0]['Subject']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 拆分训练集和测试集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "x = np.array(ham_emails + spam_emails)\n",
    "y =np.array([0] * len(ham_emails) + [1] * len(spam_emails))\n",
    "\n",
    "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 首先需要用函数将html转换为纯文本，使用Beautifulsoup库，首先删除head部分，然后将所有的a超链接标签转换为单词hyperlink，然后去掉所有html标记，只留下纯文本。为了可读性，需要用一个换行符替换多个换行符，最后取消html实体（如&gt 或者&nbsp）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re\n",
    "from html import unescape\n",
    "\n",
    "def html_to_plain_text(html):\n",
    "    text = re.sub('<head.*?>.*?</head>', '', html, flags=re.M | re.S |re.I)\n",
    "    text = re.sub('<a\\s.*?>', 'HYPERLINK', text, flags=re.M | re.S |re.I)\n",
    "    text = re.sub('<.*?>', '', text, flags= re.M | re.S)\n",
    "    text = re.sub(r'(\\s*\\n)+', '\\n', text, flags=re.M | re.S)\n",
    "    return unescape(text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<HTML><HEAD><TITLE></TITLE><META http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"><STYLE>A:link {TEX-DECORATION: none}A:active {TEXT-DECORATION: none}A:visited {TEXT-DECORATION: none}A:hover {COLOR: #0033ff; TEXT-DECORATION: underline}</STYLE><META content=\"MSHTML 6.00.2713.1100\" name=\"GENERATOR\"></HEAD>\n",
      "<BODY text=\"#000000\" vLink=\"#0033ff\" link=\"#0033ff\" bgColor=\"#CCCC99\"><TABLE borderColor=\"#660000\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" width=\"100%\"><TR><TD bgColor=\"#CCCC99\" valign=\"top\" colspan=\"2\" height=\"27\">\n",
      "<font size=\"6\" face=\"Arial, Helvetica, sans-serif\" color=\"#660000\">\n",
      "<b>OTC</b></font></TD></TR><TR><TD height=\"2\" bgcolor=\"#6a694f\">\n",
      "<font size=\"5\" face=\"Times New Roman, Times, serif\" color=\"#FFFFFF\">\n",
      "<b>&nbsp;Newsletter</b></font></TD><TD height=\"2\" bgcolor=\"#6a694f\"><div align=\"right\"><font color=\"#FFFFFF\">\n",
      "<b>Discover Tomorrow's Winners&nbsp;</b></font></div></TD></TR><TR><TD height=\"25\" colspan=\"2\" bgcolor=\"#CCCC99\"><table width=\"100%\" border=\"0\"  ...\n"
     ]
    }
   ],
   "source": [
    "html_spam_emails = [email for email in x_train[y_train == 1] \n",
    "                    if get_email_stucture(email) == 'text/html' ]\n",
    "sample_html_spam = html_spam_emails[7]\n",
    "print(sample_html_spam.get_content().strip()[:1000], '...')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "OTC\n",
      " Newsletter\n",
      "Discover Tomorrow's Winners \n",
      "For Immediate Release\n",
      "Cal-Bay (Stock Symbol: CBYI)\n",
      "Watch for analyst \"Strong Buy Recommendations\" and several advisory newsletters picking CBYI.  CBYI has filed to be traded on the OTCBB, share prices historically INCREASE when companies get listed on this larger trading exchange. CBYI is trading around 25 cents and should skyrocket to $2.66 - $3.25 a share in the near future.\n",
      "Put CBYI on your watch list, acquire a position TODAY.\n",
      "REASONS TO INVEST IN CBYI\n",
      "A profitable company and is on track to beat ALL earnings estimates!\n",
      "One of the FASTEST growing distributors in environmental & safety equipment instruments.\n",
      "Excellent management team, several EXCLUSIVE contracts.  IMPRESSIVE client list including the U.S. Air Force, Anheuser-Busch, Chevron Refining and Mitsubishi Heavy Industries, GE-Energy & Environmental Research.\n",
      "RAPIDLY GROWING INDUSTRY\n",
      "Industry revenues exceed $900 million, estimates indicate that there could be as much as $25 billi ...\n"
     ]
    }
   ],
   "source": [
    "print(html_to_plain_text(sample_html_spam.get_content())[:1000], '...')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 编写一个函数，它以电子邮件输入，并以纯文本的形式返回其内容，无论格式是什么\n",
    "def email_to_text(email):\n",
    "    html = None\n",
    "    for part in email.walk():\n",
    "        ctype = part.get_content_type()\n",
    "        if not ctype in ('text/plain','text/html'):\n",
    "            continue\n",
    "        try:\n",
    "            content = part.get_content()\n",
    "        except: #解决编码问题\n",
    "            content =str(part.get_payload())\n",
    "        if ctype == 'text/plain':\n",
    "            return content\n",
    "        else:\n",
    "            html = content\n",
    "    if html:\n",
    "        return html_to_plain_text(html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "OTC\n",
      " Newsletter\n",
      "Discover Tomorrow's Winners \n",
      "For Immediate Release\n",
      "Cal-Bay (Stock Symbol: CBYI)\n",
      "Wat ...\n"
     ]
    }
   ],
   "source": [
    "print(email_to_text(sample_html_spam)[:100], '...')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Computations > comput\n",
      "Computation > comput\n",
      "Computing > comput\n"
     ]
    }
   ],
   "source": [
    "# 自然语言工具包 nltk\n",
    "# 用‘url’ 替换url\n",
    "\n",
    "import nltk\n",
    "from urlextract import URLExtract\n",
    "\n",
    "try:\n",
    "    import nltk\n",
    "    \n",
    "    stemmer = nltk.PorterStemmer()\n",
    "    for word in ('Computations', 'Computation', 'Computing'):\n",
    "        print(word, '>', stemmer.stem(word))\n",
    "except ImportError:\n",
    "    print('Error')\n",
    "    stemmer= None"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 将所有处理整合到一个转换器中，我们将使用它将电子邮件转换成文字计数器。我们使用py中split（）的方法将句子拆分成单词，该方式将空格作为分隔符。中文可以用结巴分词"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.base import BaseEstimator, TransformerMixin\n",
    "\n",
    "class EmailToWordCounterTransformer(BaseEstimator, TransformerMixin):\n",
    "    def __init__(self, strip_headers=True, lower_case=True, remove_punctuation=True, \n",
    "                 replace_urls=True, replace_numbers=True,  stemming=True):\n",
    "        self.strip_headers = strip_headers\n",
    "        self.lower_case = lower_case\n",
    "        self.remove_punctuation = remove_punctuation\n",
    "        self.replace_urls = replace_urls\n",
    "        self.replace_numbers = replace_numbers\n",
    "        self.stemming = stemming     \n",
    "    def fit(self, X, y=None):\n",
    "        return self\n",
    "    def transform(self, X, y=None):\n",
    "        X_transformed = []\n",
    "        for email in X:\n",
    "            text = email_to_text(email) or \"\"\n",
    "            if self.lower_case:\n",
    "                text = text.lower()\n",
    "            if self.replace_urls:\n",
    "                extractor = URLExtract()\n",
    "                urls = list(set(extractor.find_urls(text)))\n",
    "                urls.sort(key=lambda url: len(url), reverse=True)\n",
    "                for url in urls:\n",
    "                    text = text.replace(url, \" URL \")\n",
    "            if self.replace_numbers:  # 替换数字\n",
    "                text = re.sub(r'\\d+(?:\\.\\d*(?:[eE]\\d+))?', 'NUMBER', text)\n",
    "            if self.remove_punctuation:\n",
    "                text = re.sub(r'\\W+', ' ', text, flags=re.M)\n",
    "            word_counts = Counter(text.split())\n",
    "            if self.stemming and stemmer is not None:\n",
    "                stemmed_word_counts = Counter()\n",
    "                for word, count in word_counts.items():\n",
    "                    stemmed_word = stemmer.stem(word)\n",
    "                    stemmed_word_counts[stemmed_word] += count\n",
    "                word_counts = stemmed_word_counts\n",
    "            X_transformed.append(word_counts)\n",
    "        return np.array(X_transformed)   \n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([Counter({'chuck': 1, 'murcko': 1, 'wrote': 1, 'stuff': 1, 'yawn': 1, 'r': 1}),\n",
       "       Counter({'the': 11, 'of': 9, 'and': 8, 'all': 3, 'christian': 3, 'to': 3, 'by': 3, 'jefferson': 2, 'i': 2, 'have': 2, 'superstit': 2, 'one': 2, 'on': 2, 'been': 2, 'ha': 2, 'half': 2, 'rogueri': 2, 'teach': 2, 'jesu': 2, 'some': 1, 'interest': 1, 'quot': 1, 'url': 1, 'thoma': 1, 'examin': 1, 'known': 1, 'word': 1, 'do': 1, 'not': 1, 'find': 1, 'in': 1, 'our': 1, 'particular': 1, 'redeem': 1, 'featur': 1, 'they': 1, 'are': 1, 'alik': 1, 'found': 1, 'fabl': 1, 'mytholog': 1, 'million': 1, 'innoc': 1, 'men': 1, 'women': 1, 'children': 1, 'sinc': 1, 'introduct': 1, 'burnt': 1, 'tortur': 1, 'fine': 1, 'imprison': 1, 'what': 1, 'effect': 1, 'thi': 1, 'coercion': 1, 'make': 1, 'world': 1, 'fool': 1, 'other': 1, 'hypocrit': 1, 'support': 1, 'error': 1, 'over': 1, 'earth': 1, 'six': 1, 'histor': 1, 'american': 1, 'john': 1, 'e': 1, 'remsburg': 1, 'letter': 1, 'william': 1, 'short': 1, 'again': 1, 'becom': 1, 'most': 1, 'pervert': 1, 'system': 1, 'that': 1, 'ever': 1, 'shone': 1, 'man': 1, 'absurd': 1, 'untruth': 1, 'were': 1, 'perpetr': 1, 'upon': 1, 'a': 1, 'larg': 1, 'band': 1, 'dupe': 1, 'import': 1, 'led': 1, 'paul': 1, 'first': 1, 'great': 1, 'corrupt': 1}),\n",
       "       Counter({'url': 4, 's': 3, 'group': 3, 'to': 3, 'in': 2, 'forteana': 2, 'martin': 2, 'an': 2, 'and': 2, 'we': 2, 'is': 2, 'yahoo': 2, 'unsubscrib': 2, 'y': 1, 'adamson': 1, 'wrote': 1, 'for': 1, 'altern': 1, 'rather': 1, 'more': 1, 'factual': 1, 'base': 1, 'rundown': 1, 'on': 1, 'hamza': 1, 'career': 1, 'includ': 1, 'hi': 1, 'belief': 1, 'that': 1, 'all': 1, 'non': 1, 'muslim': 1, 'yemen': 1, 'should': 1, 'be': 1, 'murder': 1, 'outright': 1, 'know': 1, 'how': 1, 'unbias': 1, 'memri': 1, 'don': 1, 't': 1, 'html': 1, 'rob': 1, 'sponsor': 1, 'number': 1, 'dvd': 1, 'free': 1, 'p': 1, 'join': 1, 'now': 1, 'from': 1, 'thi': 1, 'send': 1, 'email': 1, 'egroup': 1, 'com': 1, 'your': 1, 'use': 1, 'of': 1, 'subject': 1}),\n",
       "       Counter({'to': 6, 'anthoni': 2, 'i': 2, 'url': 2, 'a': 2, 'or': 2, 'it': 2, 'skip': 1, 'montanaro': 1, 'baxter': 1, 'accordingli': 1, 'wrote': 1, 'which': 1, 'is': 1, 'mostli': 1, 'ripoff': 1, 'of': 1, 'someth': 1, 'someon': 1, 'els': 1, 'post': 1, 'python': 1, 'dev': 1, 'within': 1, 'the': 1, 'last': 1, 'week': 1, 'so': 1, 'strip': 1, 'out': 1, 'sa': 1, 'gener': 1, 'header': 1, 'unless': 1, 've': 1, 'grown': 1, 'senil': 1, 'tonight': 1, 'you': 1, 'got': 1, 'from': 1, 'begin': 1, 'with': 1, 'pleas': 1, 'check': 1, 'in': 1, 'project': 1, 'and': 1, 'add': 1, 'short': 1, 'blurb': 1, 'readm': 1, 'txt': 1}),\n",
       "       Counter({'a': 8, 'the': 6, 'toni': 5, 'folder': 5, 'number': 4, 'in': 3, 'you': 3, 'exmh': 3, 'on': 2, 'to': 2, 'for': 2, 'link': 2, 'or': 2, 'move': 2, 'list': 2, 'mode': 2, 'hit': 2, 'and': 2, 'user': 2, 'fri': 1, 'sep': 1, 'nugent': 1, 'wrote': 1, 'essenc': 1, 'is': 1, 'there': 1, 'way': 1, 'mark': 1, 'destin': 1, 'messag': 1, 'without': 1, 'actual': 1, 'do': 1, 'i': 1, 'couldn': 1, 't': 1, 'see': 1, 'anyth': 1, 'obviou': 1, 'right': 1, 'click': 1, 'label': 1, 'main': 1, 'window': 1, 'key': 1, 'put': 1, 'into': 1, 'chang': 1, 'first': 1, 'time': 1, 'use': 1, 'it': 1, 'after': 1, 'start': 1, 'second': 1, 'go': 1, 'set': 1, 'target': 1, 'type': 1, 'few': 1, 'charact': 1, 'of': 1, 'name': 1, 'space': 1, 'autocomplet': 1, 'hal': 1, 'how': 1, 's': 1, 'spring': 1, 'shape': 1, 'up': 1, 'down': 1, 'under': 1, '_______________________________________________': 1, 'mail': 1, 'redhat': 1, 'com': 1, 'url': 1}),\n",
       "       Counter({'number': 11, 'razor': 8, 'i': 8, 'thi': 6, 'url': 6, 'the': 5, 'list': 5, 'a': 5, 'spamassassin': 4, 'is': 4, 'user': 4, 'on': 3, 'for': 3, 'run': 3, 'of': 3, 'so': 3, 'd': 3, 'here': 3, 'line': 3, 'first': 2, 'it': 2, 'to': 2, 'm': 2, 'with': 2, 'or': 2, 'messag': 2, 'razornumb': 2, 'email': 2, 'sponsor': 2, 'by': 2, 'osdn': 2, 'tire': 2, 'that': 2, 'same': 2, 'old': 2, 'cell': 2, 'phone': 2, 'get': 2, 'new': 2, 'free': 2, '_______________________________________________': 2, 'mail': 2, 'sourceforg': 2, 'net': 2, 'you': 1, 'might': 1, 'be': 1, 'better': 1, 'ask': 1, 'talk': 1, 'folk': 1, 'there': 1, 'will': 1, 'almost': 1, 'definit': 1, 'have': 1, 'an': 1, 'answer': 1, 'thu': 1, 'sep': 1, 'david': 1, 'ree': 1, 'wrote': 1, 'my': 1, 'time': 1, 'heard': 1, 'lot': 1, 'good': 1, 'thing': 1, 'about': 1, 'thought': 1, 'give': 1, 'shot': 1, 'also': 1, 'like': 1, 'integr': 1, 'two': 1, 'not': 1, 'sure': 1, 'if': 1, 'problem': 1, 'though': 1, 'shoot': 1, 'freshli': 1, 'instal': 1, 'and': 1, 'see': 1, 'these': 1, 'spit': 1, 'out': 1, 'from': 1, 'spamd': 1, 'check': 1, 'skip': 1, 'no': 1, 'such': 1, 'file': 1, 'directori': 1, 'can': 1, 't': 1, 'call': 1, 'method': 1, 'log': 1, 'unbless': 1, 'refer': 1, 'at': 1, 'usr': 1, 'lib': 1, 'perlnumb': 1, 'site_perl': 1, 'client': 1, 'agent': 1, 'pm': 1, 'stdin': 1, 'ani': 1, 'idea': 1, 'seem': 1, 'correctli': 1, 'over': 1, 'command': 1, 'thank': 1, 'dave': 1}),\n",
       "       Counter({'a': 10, 'i': 7, 'to': 7, 'song': 5, 'the': 4, 'and': 4, 'url': 4, 'of': 3, 'playlist': 3, 'digit': 3, 'is': 3, 'not': 3, 'their': 3, 'm': 3, 'up': 3, 'law': 2, 'can': 2, 'number': 2, 'from': 2, 'inform': 2, 'that': 2, 'if': 2, 'it': 2, 'websit': 2, 'with': 2, 'servic': 2, 'as': 2, 'info': 2, 'my': 2, 'anyon': 1, 'heard': 1, 'thi': 1, 'befor': 1, 'q': 1, 'get': 1, 'we': 1, 'are': 1, 'unabl': 1, 'offer': 1, 'perform': 1, 'right': 1, 'in': 1, 'sound': 1, 'record': 1, 'act': 1, 'pass': 1, 'by': 1, 'congress': 1, 'prevent': 1, 'us': 1, 'disclos': 1, 'such': 1, 'state': 1, 'one': 1, 'transmit': 1, 'signal': 1, 'cannot': 1, 'be': 1, 'pre': 1, 'announc': 1, 'music': 1, 'choic': 1, 'polici': 1, 'releas': 1, 'upcom': 1, 'or': 1, 'previous': 1, 'play': 1, 'recent': 1, 'musicchoic': 1, 'upgrad': 1, 'veri': 1, 'import': 1, 'far': 1, 'concern': 1, 'real': 1, 'time': 1, 'directv': 1, 'receiv': 1, 'on': 1, 'shelf': 1, 'display': 1, 'scroll': 1, 'intermitt': 1, 'sure': 1, 'go': 1, 'fire': 1, 'projector': 1, 'while': 1, 'listen': 1, 'radio': 1, 'so': 1, 'quit': 1, 'happi': 1, 'retriev': 1, 'r': 1, 't': 1, 'like': 1, 'etc': 1, 'now': 1, 'were': 1, 'more': 1, 'eager': 1, 'hacker': 1, 'd': 1, 'write': 1, 'littl': 1, 'wsdl': 1, 'stub': 1, 'for': 1, 'these': 1, 'event': 1, 'stream': 1, 'they': 1, 're': 1, 'clearli': 1, 'worri': 1, 'about': 1, 'load': 1, 'sinc': 1, 'own': 1, 'web': 1, 'page': 1, 'specifi': 1, 'sec': 1, 'meta': 1, 'refresh': 1, 'then': 1, 'feed': 1, 'em': 1, 'through': 1, 'content': 1, 'router': 1, 'alert': 1, 'me': 1, 'cool': 1, 'heck': 1, 'cross': 1, 'refer': 1, 'cddb': 1, 'rk': 1}),\n",
       "       Counter({'i': 8, 'to': 6, 'html': 6, 'a': 6, 'the': 5, 'in': 5, 'd': 4, 'strip': 4, 'that': 4, 'thi': 4, 'get': 4, 'but': 3, 'it': 3, 'on': 3, 'text': 3, 'like': 3, 'tag': 2, 'from': 2, 'time': 2, 'rate': 2, 'my': 2, 'corpora': 2, 'though': 2, 's': 2, 'good': 2, 'corpu': 2, 'than': 2, 'save': 2, 't': 2, 'much': 2, 'so': 2, 'url': 2, 'too': 2, 'prefer': 1, 'everyth': 1, 'last': 1, 'tri': 1, 'still': 1, 'had': 1, 'bad': 1, 'effect': 1, 'error': 1, 'your': 1, 'are': 1, 'bias': 1, 'respect': 1, 'newsgroup': 1, 'have': 1, 'strong': 1, 'social': 1, 'taboo': 1, 'post': 1, 'mani': 1, 'peopl': 1, 'person': 1, 'inbox': 1, 'is': 1, 'quit': 1, 'abund': 1, 'ham': 1, 'may': 1, 'prove': 1, 'be': 1, 'bigger': 1, 'hurdl': 1, 'own': 1, 'mail': 1, 'doesn': 1, 'reflect': 1, 'what': 1, 'receiv': 1, 'sinc': 1, 'and': 1, 'throw': 1, 'away': 1, 'select': 1, 'more': 1, 'past': 1, 'multipart': 1, 'mix': 1, 'plain': 1, 'brief': 1, 'plu': 1, 'long': 1, 'copi': 1, 'websit': 1, 'ah': 1, 'explain': 1, 'whi': 1, 'didn': 1, 'again': 1, 'offer': 1, 'add': 1, 'an': 1, 'option': 1, 'argument': 1, 'token': 1, 'they': 1, 'here': 1, 'if': 1, 'gloss': 1, 'over': 1, 'third': 1, 'would': 1, 'feel': 1, 'loss': 1, 'wink': 1, 'll': 1, 'bite': 1, 'sound': 1, 'idea': 1, 'case': 1, 'see': 1, 'how': 1, 'improv': 1, 'f': 1, 'p': 1, 'guido': 1, 'van': 1, 'rossum': 1, 'home': 1, 'page': 1}),\n",
       "       Counter({'vip': 4, 'stop': 2, 'e': 2, 'project': 2, 'web': 2, 'com': 2, 'までお送り下さい': 2, 'url': 2, '事業者': 1, '氏名': 1, 'mail': 1, '突然のメール失礼いたします': 1, '今後この広告がご不要な方はその旨を': 1, 'リッチな出会いはvip': 1, 'mailで': 1, 'mailがハイクラスな出会いをプレゼント': 1, '携帯numberキャリアとpc対応の出会いサイト': 1, '今までの出会いサイトに飽きた人': 1, '出会いは欲しいけどサイトを使うのはと迷ってる人': 1, '今直ぐvip': 1, 'mailにgo': 1, '女性無料は当たり前': 1, '男性にはお試しポイントnumberptプレゼント': 1, '女性はリッチな男性をgetしようo': 1, 'o': 1, '男性はお試しポイント気に入った娘を見つけよう': 1, 'b': 1, '出会いを求めるならvip': 1, 'mailに今直ぐアクセス': 1, '突然のメール失礼いたしました': 1, '今後この広告がご不要な方': 1, '配信停止を希望される方はその旨を': 1}),\n",
       "       Counter({'number': 8, 'os': 5, 'mac': 4, 'x': 3, 'url': 2, 'a': 2, 'date': 1, 'numbertnumb': 1, 'which': 1, 'wa': 1, 'the': 1, 'better': 1, 'ui': 1, 'window': 1, 'nobodi': 1, 'can': 1, 'agre': 1, 'tim': 1, 'o': 1, 'reilli': 1, 'didn': 1, 't': 1, 'like': 1, 'he': 1, 'get': 1, 'tradit': 1, 'user': 1, 'are': 1, 'bit': 1, 'annoy': 1, 'by': 1, 'they': 1, 'think': 1, 'it': 1, 's': 1})],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 在邮件上测试 转换器\n",
    "X_few = x_train[:10]\n",
    "X_few_wordcounts = EmailToWordCounterTransformer().fit_transform(X_few)\n",
    "X_few_wordcounts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 有了单词计数，我们需要将他们转化成向量。为此，构建转化器，其fit（）方法将构建词汇表（常用单词列表）其transform（）将使用词汇表将单词计算转换为向量-稀疏矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [],
   "source": [
    "from scipy.sparse import csr_matrix\n",
    "\n",
    "class WordCounterToVectorTransformer(BaseEstimator, TransformerMixin):\n",
    "    def __init__(self, vocabulary_size = 1000):\n",
    "        self.vocabulary_size = vocabulary_size\n",
    "    def fit(self, X, y=None ):\n",
    "        total_count = Counter()\n",
    "        for word_count in X:\n",
    "            for word, count in word_count.items():\n",
    "                total_count[word] += min(count,10)\n",
    "        most_common = total_count.most_common()[:self.vocabulary_size]\n",
    "        self.most_common = most_common\n",
    "        self.vocabulary_ = {word : index + 1 for index, (word, count) in enumerate(most_common)}   # enumerate 具有索引的列表推导式\n",
    "        return self   \n",
    "    def transform(self, X, y=None):\n",
    "        rows = []\n",
    "        cols = []\n",
    "        data = []\n",
    "        for row, word_count in enumerate(X):\n",
    "            for word, count in word_count.items():\n",
    "                rows.append(row)\n",
    "                cols.append(self.vocabulary_.get(word, 0)) # 取单词在词汇表中的位置，0代表没有出现在词汇表\n",
    "                data.append(count)\n",
    "        return csr_matrix((data, (rows, cols)), shape = (len(X), self.vocabulary_size + 1))\n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  (0, 0)\t1\n",
      "  (0, 1)\t0\n",
      "  (0, 2)\t1\n",
      "  (1, 0)\t0\n",
      "  (1, 1)\t1\n",
      "  (1, 2)\t1\n",
      "  (2, 0)\t1\n",
      "  (2, 1)\t1\n",
      "  (2, 2)\t0\n",
      "[[1 0 1]\n",
      " [0 1 1]\n",
      " [1 1 0]]\n"
     ]
    }
   ],
   "source": [
    "# csr示例\n",
    "from scipy.sparse import *\n",
    "\n",
    "row = [0,0,0,1,1,1,2,2,2]  #行指标\n",
    "col = [0,1,2,0,1,2,0,1,2]  #列指标\n",
    "data =[1,0,1,0,1,1,1,1,0]  #行指标列指标下的数字\n",
    "team = csr_matrix((data,(row,col)),shape =(3,3))\n",
    "print(team)\n",
    "print(team.todense())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10, 11)"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vocab_transformer = WodrCounterToVectorTransformer(vocabulary_size = 10 )\n",
    "X_few_vectors = vocab_transformer.fit_transform(X_few_wordcounts)\n",
    "X_few_vectors.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  6,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0],\n",
       "       [106,   1,  11,   3,   2,   0,   1,   8,   9,   1,   1],\n",
       "       [ 67,   0,   0,   3,   0,   1,   4,   2,   1,   2,   1],\n",
       "       [ 48,   2,   1,   6,   2,   0,   2,   1,   1,   1,   0],\n",
       "       [ 90,   8,   6,   2,   1,   4,   1,   2,   1,   3,   0],\n",
       "       [171,   5,   5,   2,   8,  11,   6,   1,   3,   0,   6],\n",
       "       [162,  10,   4,   7,   7,   2,   4,   4,   3,   1,   1],\n",
       "       [157,   6,   5,   6,   8,   0,   2,   1,   0,   5,   4],\n",
       "       [ 40,   0,   0,   0,   0,   0,   2,   0,   0,   0,   0],\n",
       "       [ 40,   2,   1,   0,   0,   8,   2,   0,   0,   0,   0]],\n",
       "      dtype=int32)"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_few_vectors.toarray()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'a': 1,\n",
       " 'the': 2,\n",
       " 'to': 3,\n",
       " 'i': 4,\n",
       " 'number': 5,\n",
       " 'url': 6,\n",
       " 'and': 7,\n",
       " 'of': 8,\n",
       " 'in': 9,\n",
       " 'thi': 10}"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vocab_transformer.vocabulary_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 垃圾邮件分类器，转换数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 自动化变化，清洗数据\n",
    "from sklearn.pipeline import Pipeline\n",
    "\n",
    "preprocess_pipeline = Pipeline([\n",
    "    ('email_to_wordcount', EmailToWordCounterTransformer()),\n",
    "    ('wordcount_to_vector',WordCounterToVectorTransformer()),\n",
    "])\n",
    "x_tran_transformed = preprocess_pipeline.fit_transform(x_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n",
      "[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    0.1s remaining:    0.0s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV]  ................................................................\n",
      "[CV] .................................... , score=0.981, total=   0.2s\n",
      "[CV]  ................................................................\n",
      "[CV] .................................... , score=0.981, total=   0.3s\n",
      "[CV]  ................................................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   2 out of   2 | elapsed:    0.3s remaining:    0.0s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .................................... , score=0.991, total=   0.6s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   3 out of   3 | elapsed:    1.0s finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.9845833333333333"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.model_selection import cross_val_score\n",
    "\n",
    "log_clf = LogisticRegression(solver = 'liblinear', random_state=42)  #逻辑回归分类器\n",
    "\n",
    "score = cross_val_score(log_clf, x_tran_transformed, y_train, cv = 3, verbose=3)  # 交叉认证，评估精度\n",
    "score.mean()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV]  ................................................................\n",
      "[CV] .................................... , score=0.979, total=   6.1s\n",
      "[CV]  ................................................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    6.1s remaining:    0.0s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .................................... , score=0.984, total=   5.7s\n",
      "[CV]  ................................................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   2 out of   2 | elapsed:   11.8s remaining:    0.0s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .................................... , score=0.988, total=   6.2s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   3 out of   3 | elapsed:   17.9s finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.9833333333333334"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import sklearn.ensemble as sk\n",
    "\n",
    "rfc = sk.RandomForestClassifier(n_estimators=500, oob_score=True)\n",
    "\n",
    "score = cross_val_score(rfc, x_tran_transformed, y_train, cv = 3, verbose=3)  # 交叉认证，评估精度\n",
    "score.mean()\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 得到超过98%的分数，可以尝试多个模型，选择最好的模型，并使用交叉验证进行微调，在测试集上得到精度/召回率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "精度：93.94%\n",
      "召回：97.89%\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import precision_score, recall_score\n",
    "\n",
    "x_test_transformed = preprocess_pipeline.transform(x_test)\n",
    "log_clf = LogisticRegression(solver = 'liblinear', random_state=42)  #逻辑回归分类器\n",
    "log_clf.fit(x_tran_transformed, y_train)\n",
    "\n",
    "y_pred = log_clf.predict(x_test_transformed)\n",
    "\n",
    "print('精度：{:.2f}%'.format(100 * precision_score(y_test, y_pred)))\n",
    "print('召回：{:.2f}%'.format(100 * recall_score(y_test,y_pred)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 总结"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "   1. 加载数据要纵观数据大局\n",
    "   2. 获取邮件的组成结构\n",
    "   3. 对结构类型进行分组计数 发现垃圾邮件大多html结构\n",
    "   4. 数据清洗 定义email对象中html转换纯文本\n",
    "   5. 对数据集拆分 训练集和测试集\n",
    "   6. 数据处理转换，对邮件的文本内容进行分词处理，并通过nltk进行词干提取，汇总邮件中频繁词汇的的计数统计\n",
    "   7. 通过词汇便和单词计数统计，将单词转换向量矩阵\n",
    "   8. 数据清洗和数据处理分装成两个转换器\n",
    "   9. 流水线 自动化处理\n",
    "   10. 逻辑回归线性分类器进行模型训练\n",
    "   11. 交叉验证\n",
    "   12. 测试集得到精度和召回率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
